상속: 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
 /**
  * {@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
 /**
  * {@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
 public function __construct($template)
 {
     parent::__construct('MultipleSelect', []);
     $this->template = $template;
 }
예제 #10
0
 public function __construct($template)
 {
     parent::__construct('ResourceLocator', '');
     $this->template = $template;
 }