Inheritance: implements Sulu\Component\Content\ContentTypeInterface
Exemplo n.º 1
0
 public function __construct($template, MarkupParserInterface $markupParser, $markupNamespace = 'sulu')
 {
     parent::__construct('TextEditor', '');
     $this->template = $template;
     $this->markupParser = $markupParser;
     $this->markupNamespace = $markupNamespace;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 public function __construct($template)
 {
     parent::__construct('Phone', '');
     $this->template = $template;
 }
Exemplo n.º 5
0
 public function __construct($template)
 {
     parent::__construct('Checkbox', false);
     $this->template = $template;
 }
Exemplo n.º 6
0
 public function __construct($template)
 {
     parent::__construct('TextArea', '');
     $this->template = $template;
 }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 public function __construct($template)
 {
     parent::__construct('SingleSelect', '');
     $this->template = $template;
 }
Exemplo n.º 9
0
 public function __construct($template)
 {
     parent::__construct('MultipleSelect', []);
     $this->template = $template;
 }
Exemplo n.º 10
0
 public function __construct($template)
 {
     parent::__construct('ResourceLocator', '');
     $this->template = $template;
 }