Inheritance: implements Sulu\Component\Content\ContentTypeInterface
コード例 #1
0
ファイル: TextEditor.php プロジェクト: sulu/sulu
 public function __construct($template, MarkupParserInterface $markupParser, $markupNamespace = 'sulu')
 {
     parent::__construct('TextEditor', '');
     $this->template = $template;
     $this->markupParser = $markupParser;
     $this->markupNamespace = $markupNamespace;
 }
コード例 #2
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);
 }
コード例 #3
0
ファイル: SingleInternalLink.php プロジェクト: Silwereth/sulu
 /**
  * {@inheritdoc}
  */
 public function write(NodeInterface $node, PropertyInterface $property, $userId, $webspaceKey, $languageCode, $segmentKey)
 {
     $value = $property->getValue();
     if ($node->getIdentifier() !== null && $value === $node->getIdentifier()) {
         throw new \InvalidArgumentException('Internal link node cannot reference itself');
     }
     parent::write($node, $property, $userId, $webspaceKey, $languageCode, $segmentKey);
 }
コード例 #4
0
ファイル: Phone.php プロジェクト: ollietb/sulu
 public function __construct($template)
 {
     parent::__construct('Phone', '');
     $this->template = $template;
 }
コード例 #5
0
ファイル: Checkbox.php プロジェクト: Silwereth/sulu
 public function __construct($template)
 {
     parent::__construct('Checkbox', false);
     $this->template = $template;
 }
コード例 #6
0
ファイル: TextArea.php プロジェクト: Silwereth/sulu
 public function __construct($template)
 {
     parent::__construct('TextArea', '');
     $this->template = $template;
 }
コード例 #7
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);
 }
コード例 #8
0
ファイル: SingleSelect.php プロジェクト: sulu/sulu
 public function __construct($template)
 {
     parent::__construct('SingleSelect', '');
     $this->template = $template;
 }
コード例 #9
0
ファイル: MultipleSelect.php プロジェクト: sulu/sulu
 public function __construct($template)
 {
     parent::__construct('MultipleSelect', []);
     $this->template = $template;
 }
コード例 #10
0
ファイル: ResourceLocator.php プロジェクト: sulu/sulu
 public function __construct($template)
 {
     parent::__construct('ResourceLocator', '');
     $this->template = $template;
 }