コード例 #1
0
 public function __construct($name, $callback, $description, $dataType, $rel = null, $validationParameters = [])
 {
     parent::__construct($name, $callback, $description, $dataType, $rel);
     $this->validationParameters = $validationParameters;
 }
コード例 #2
0
 protected function processField(Field $field)
 {
     $f = ['name' => $field->getName(), 'type' => $field->getDataType()];
     $rel = $field->getRel();
     if (mb_strlen($rel) > 0) {
         $f['rel'] = $rel;
     }
     return $f;
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function applyField(CompiledTransformMappingInterface $transformMapping, $instance, Field $field, $value)
 {
     $callback = $field->getCallback();
     $this->setFieldValue($instance, $callback, $value);
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function rolesForField(Field $field, $securityAttribute, $pathPrefix)
 {
     $roles = [$this->roleName($pathPrefix, 'field', $field->getName()), $this->roleName($pathPrefix, 'field', $field->getName(), $securityAttribute), $this->roleName($pathPrefix, 'field', 'all'), $this->roleName($pathPrefix, 'field', 'all', $securityAttribute)];
     return $this->makeRoles($roles);
 }