Example #1
0
 /**
  * Serializer constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->addAttributes('partial', 'context');
     $this->fields = array_merge($this->generateFields(), $this->generateAppendedFields());
     $this->setFields();
 }
Example #2
0
 /**
  * After Validation save file.
  *
  * @param $value
  *
  * @return string
  */
 public function runValidation($value)
 {
     /* @var $file File */
     $file = parent::runValidation($value);
     return $this->uploadFile($file);
 }
Example #3
0
 /**
  * @param $data DateTime
  *
  * @throws ValidationError
  */
 public function runValidationClause($data)
 {
     $data = $data->format($this->outputFormat);
     return parent::runValidationClause($data);
 }