Inheritance: extends Sulu\Component\Rest\ListBuilder\FieldDescriptor, implements Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface
コード例 #1
0
 public function __construct($fieldName, $name, $entityName, $translation = null, $joins = [], $disabled = false, $default = false, $type = '', $width = '', $minWidth = '', $sortable = true, $editable = false, $cssClass = '')
 {
     parent::__construct($name, $translation, $disabled, $default, $type, $width, $minWidth, $sortable, $editable, $cssClass);
     $this->fieldName = $fieldName;
     $this->entityName = $entityName;
     $this->joins = $joins;
 }
コード例 #2
0
 /**
  * Returns all the joins required for the query.
  *
  * @return DoctrineJoinDescriptor[]
  */
 private function getJoins()
 {
     $joins = [];
     if ($this->sortField != null) {
         $joins = array_merge($joins, $this->sortField->getJoins());
     }
     foreach ($this->fields as $field) {
         $joins = array_merge($joins, $field->getJoins());
     }
     foreach ($this->searchFields as $searchField) {
         $joins = array_merge($joins, $searchField->getJoins());
     }
     foreach ($this->whereFields as $whereField) {
         $joins = array_merge($joins, $whereField->getJoins());
     }
     foreach ($this->whereNotFields as $whereNotField) {
         $joins = array_merge($joins, $whereNotField->getJoins());
     }
     foreach ($this->inFields as $inField) {
         $joins = array_merge($joins, $inField->getJoins());
     }
     return $joins;
 }
コード例 #3
0
 public function __construct(array $fieldDescriptors, $name, $translation = null, $glue = ' ', $disabled = false, $default = false, $type = '', $width = '', $minWidth = '', $sortable = true, $editable = false, $cssClass = '')
 {
     parent::__construct($name, $translation, $disabled, $default, $type, $width, $minWidth, $sortable, $editable, $cssClass);
     $this->fieldDescriptors = $fieldDescriptors;
     $this->glue = $glue;
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function getFieldName()
 {
     return $this->field->getName();
 }
コード例 #5
0
 public function __construct(DoctrineFieldDescriptorInterface $fieldDescriptor, $name, $translation = null, $glue = ',', $disabled = false, $default = false, $type = '', $width = '', $minWidth = '', $sortable = true, $editable = false, $cssClass = '')
 {
     parent::__construct($name, $translation, $disabled, $default, $type, $width, $minWidth, $sortable, $editable, $cssClass);
     $this->fieldDescriptor = $fieldDescriptor;
     $this->glue = $glue;
 }
コード例 #6
0
 public function __construct($name, DoctrineDescriptor $case1, DoctrineDescriptor $case2, $translation = null, $disabled = false, $default = false, $type = '', $width = '', $minWidth = '', $sortable = true, $editable = false, $cssClass = '')
 {
     parent::__construct($name, $translation, $disabled, $default, $type, $width, $minWidth, $sortable, $editable, $cssClass);
     $this->case1 = $case1;
     $this->case2 = $case2;
 }
コード例 #7
0
 /**
  * Returns all the joins required for this field.
  *
  * @return DoctrineJoinDescriptor[]
  */
 public function getJoins()
 {
     return $this->fieldDescriptor->getJoins();
 }