Sulu\Component\Content\SimpleContentType::importData PHP Method

importData() public method

public importData ( PHPCR\NodeInterface $node, Sulu\Component\Content\Compat\PropertyInterface $property, $value, $userId, $webspaceKey, $languageCode, $segmentKey = null )
$node PHPCR\NodeInterface
$property Sulu\Component\Content\Compat\PropertyInterface
    public function importData(NodeInterface $node, PropertyInterface $property, $value, $userId, $webspaceKey, $languageCode, $segmentKey = null)
    {
        $property->setValue($value);
        $this->write($node, $property, $userId, $webspaceKey, $languageCode, $segmentKey);
    }

Usage Example

示例#1
0
文件: Checkbox.php 项目: sulu/sulu
 /**
  * {@inheritdoc}
  */
 public function importData(NodeInterface $node, PropertyInterface $property, $value, $userId, $webspaceKey, $languageCode, $segmentKey = null)
 {
     $preparedValue = true;
     if ($value === '0') {
         $preparedValue = false;
     }
     parent::importData($node, $property, $preparedValue, $userId, $webspaceKey, $languageCode, $segmentKey);
 }
All Usage Examples Of Sulu\Component\Content\SimpleContentType::importData