Exemplo n.º 1
0
 /**
  * @param \watoki\reflect\Property $property
  * @return \watoki\qrator\form\Field
  */
 public function getField(Property $property)
 {
     if (isset($this->fields[$property->name()])) {
         return $this->fields[$property->name()];
     }
     return parent::getField($property);
 }
Exemplo n.º 2
0
 protected function assembleValueWithActions($entity, Property $property, $value)
 {
     if (is_object($value)) {
         $entityRepresenter = $this->registry->getEntityRepresenter($entity);
         $propertyRepresenter = $this->registry->getEntityRepresenter($value);
         return ['caption' => $propertyRepresenter->render($value), 'actions' => array_merge($this->assembleActions($propertyRepresenter->getActions($value)), $this->assembleActions($entityRepresenter->getPropertyActions($entity, $property->name(), $value)))];
     }
     return ['caption' => $this->toString($value), 'actions' => null];
 }
Exemplo n.º 3
0
 private function makePropertyParameter(Parameter $parameter, Property $property)
 {
     return new Parameter($parameter->getName() . '[' . $property->name() . ']', $property->type(), $property->isRequired());
 }
Exemplo n.º 4
0
 /**
  * @param \watoki\reflect\Property $property
  * @return \watoki\qrator\form\Field
  */
 protected function getField(Property $property)
 {
     return $this->getFieldForType($property->name(), $property->type());
 }