public function __construct($name, $field, $entityField, array $options = []) { if (isset($options['filter_empty']) && true === $options['filter_empty']) { throw new \Exception('filtering for empty values is not allowed for EntitiesColumn'); } if (isset($options['sortable']) && true === $options['sortable']) { throw new \Exception('sortable = true is not allowed for EntitiesColumn'); } // default $options['sortable'] = false; // column type specific if (!isset($options['display_join_max_entries'])) { $options['display_join_max_entries'] = 5; } if (!isset($options['display_join_glue'])) { $options['display_join_glue'] = ', '; } parent::__construct($name, $field, $entityField, $options); }
/** * @param string $name * @param string $field * @param string $entityField * @param array $options */ public function __construct($name, $field, $entityField, array $options = []) { $this->entityField = $entityField; $pos = strpos($field, '.'); if (false !== $pos) { $fields = $field; while (false !== $pos) { $sub = substr($fields, 0, $pos); $this->prefixes[] = EntityColumn::createEntityPrefix($sub); $fields = substr($fields, $pos + 1); $pos = strpos($fields, '.'); if (false === $pos && 0 < strlen($fields)) { $pos = strlen($fields); } } } else { $this->prefixes[] = self::createEntityPrefix($field); } parent::__construct($name, $field, $options); }
/** * @param string $name * @param string $field * @param array $options */ public function __construct($name, $field, array $options = []) { parent::__construct($name, $field, '', $options); }
/** * @param string $name * @param string $field * @param string $operation * @param array $options */ public function __construct($name, $field, $entityField, $operation, array $options = []) { $this->operation = $operation; parent::__construct($name, $field, $entityField, $options); }