예제 #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);
 }
예제 #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];
 }
예제 #3
0
파일: ObjectField.php 프로젝트: jonfm/domin
 private function makePropertyParameter(Parameter $parameter, Property $property)
 {
     return new Parameter($parameter->getName() . '[' . $property->name() . ']', $property->type(), $property->isRequired());
 }
예제 #4
0
 /**
  * @param \watoki\reflect\Property $property
  * @return \watoki\qrator\form\Field
  */
 protected function getField(Property $property)
 {
     return $this->getFieldForType($property->name(), $property->type());
 }