Наследование: implements Sulu\Component\Content\ContentTypeInterface
Пример #1
0
 public function __construct($template, MarkupParserInterface $markupParser, $markupNamespace = 'sulu')
 {
     parent::__construct('TextEditor', '');
     $this->template = $template;
     $this->markupParser = $markupParser;
     $this->markupNamespace = $markupNamespace;
 }
Пример #2
0
 /**
  * {@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
 /**
  * {@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
 public function __construct($template)
 {
     parent::__construct('Phone', '');
     $this->template = $template;
 }
Пример #5
0
 public function __construct($template)
 {
     parent::__construct('Checkbox', false);
     $this->template = $template;
 }
Пример #6
0
 public function __construct($template)
 {
     parent::__construct('TextArea', '');
     $this->template = $template;
 }
Пример #7
0
 /**
  * {@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
 public function __construct($template)
 {
     parent::__construct('SingleSelect', '');
     $this->template = $template;
 }
Пример #9
0
 public function __construct($template)
 {
     parent::__construct('MultipleSelect', []);
     $this->template = $template;
 }
Пример #10
0
 public function __construct($template)
 {
     parent::__construct('ResourceLocator', '');
     $this->template = $template;
 }