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
コード例 #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);
 }
コード例 #2
0
ファイル: TeaserContentType.php プロジェクト: sulu/sulu
 /**
  * {@inheritdoc}
  */
 public function importData(NodeInterface $node, PropertyInterface $property, $value, $userId, $webspaceKey, $languageCode, $segmentKey = null)
 {
     if (!empty($value)) {
         $value = json_decode($value);
     }
     parent::importData($node, $property, $value, $userId, $webspaceKey, $languageCode, $segmentKey);
 }