Esempio n. 1
0
 /**
  * Implements JsonSerializable::jsonSerialize().
  */
 public function jsonSerialize()
 {
     $valid = !isset($this->color) || $this->validateColor($this->color);
     if (!$valid) {
         return NULL;
     }
     return parent::jsonSerialize();
 }
Esempio n. 2
0
 /**
  * Define optional properties.
  */
 protected function optional()
 {
     return array_merge(parent::optional(), array('attachment'));
 }
 /**
  * Define optional properties.
  */
 protected function optional()
 {
     return array_merge(parent::optional(), array('userControllable'));
 }
Esempio n. 4
0
 /**
  * Define optional properties.
  */
 protected function optional()
 {
     return array_merge(parent::optional(), array('all', 'top', 'bottom', 'left', 'right'));
 }
Esempio n. 5
0
 /**
  * {@inheritdoc}
  */
 protected function optional()
 {
     return array_merge(parent::optional(), array('identifier', 'layout', 'style', 'anchor', 'animation', 'behavior'));
 }
Esempio n. 6
0
 /**
  * Implements JsonSerializable::jsonSerialize().
  */
 public function jsonSerialize()
 {
     if (!isset($this->componentTextStyles['default'])) {
         $msg = "Document must have at least a \"default\" ComponentTextStyle.";
         $this->triggerError($msg);
         return NULL;
     }
     return parent::jsonSerialize();
 }
Esempio n. 7
0
 /**
  * Implements JsonSerializable::jsonSerialize().
  */
 public function jsonSerialize()
 {
     $valid = (!isset($this->ignoreDocumentMargin) || $this->validateIgnoreDocumentMargin($this->ignoreDocumentMargin)) && (!isset($this->ignoreDocumentGutter) || $this->validateIgnoreDocumentGutter($this->ignoreDocumentGutter)) && (!isset($this->minimumHeight) || $this->validateMinimumHeight($this->minimumHeight));
     if (!$valid) {
         return NULL;
     }
     return parent::jsonSerialize();
 }
Esempio n. 8
0
 /**
  * Implements JsonSerializable::jsonSerialize().
  */
 public function jsonSerialize()
 {
     $valid = (!isset($this->backgroundColor) || $this->validateBackgroundColor($this->backgroundColor)) && (!isset($this->opacity) || $this->validateOpacity($this->opacity));
     if (!$valid) {
         return NULL;
     }
     return parent::jsonSerialize();
 }
Esempio n. 9
0
 /**
  * Define optional properties.
  */
 protected function optional()
 {
     return array_merge(parent::optional(), array('location'));
 }
Esempio n. 10
0
 /**
  * Implements JsonSerializable::jsonSerialize().
  */
 public function jsonSerialize()
 {
     $valid = (!isset($this->textColor) || $this->validateTextColor($this->textColor)) && (!isset($this->textTransform) || $this->validateTextTransform($this->textTransform)) && (!isset($this->backgroundColor) || $this->validateBackgroundColor($this->backgroundColor)) && (!isset($this->verticalAlignment) || $this->validateVerticalAlignment($this->verticalAlignment));
     if (!$valid) {
         return NULL;
     }
     return parent::jsonSerialize();
 }
Esempio n. 11
0
 /**
  * Implements JsonSerializable::jsonSerialize().
  */
 public function jsonSerialize()
 {
     if (isset($this->rangeStart) && !isset($this->rangeLength)) {
         $msg = "If rangeStart is specified, rangeLength is required.";
         $this->triggerError($msg);
         return NULL;
     }
     return parent::jsonSerialize();
 }
Esempio n. 12
0
 /**
  * Expose for testing.
  */
 public static function isHexColor($value)
 {
     return parent::isHexColor($value);
 }