protected function defineOptions() { $options = parent::defineOptions(); $options['order'] = array('default' => 'ASC'); $options['exposed'] = array('default' => FALSE); $options['expose'] = array('contains' => array('label' => array('default' => ''))); return $options; }
/** * {@inheritdoc} */ protected function defineOptions() { $options = parent::defineOptions(); $this->definition['field'] = !empty($this->definition['field']) ? $this->definition['field'] : ''; $label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field']; $options['admin_label']['default'] = $label; $options['empty'] = array('default' => FALSE); return $options; }
/** * {@inheritdoc} */ protected function defineOptions() { $options = parent::defineOptions(); // Relationships definitions should define a default label, but if they aren't get another default value. if (!empty($this->definition['label'])) { // Cast the label to a string since it is an object. // @see \Drupal\Core\StringTranslation\TranslationWrapper $label = (string) $this->definition['label']; } else { $label = !empty($this->definition['field']) ? $this->definition['field'] : $this->definition['base field']; } $options['admin_label']['default'] = $label; $options['required'] = array('default' => FALSE); return $options; }
protected function defineOptions() { $options = parent::defineOptions(); $options['label'] = array('default' => $this->definition['title'], 'translatable' => TRUE); $options['exclude'] = array('default' => FALSE, 'bool' => TRUE); $options['alter'] = array('contains' => array('alter_text' => array('default' => FALSE, 'bool' => TRUE), 'text' => array('default' => '', 'translatable' => TRUE), 'make_link' => array('default' => FALSE, 'bool' => TRUE), 'path' => array('default' => ''), 'absolute' => array('default' => FALSE, 'bool' => TRUE), 'external' => array('default' => FALSE, 'bool' => TRUE), 'replace_spaces' => array('default' => FALSE, 'bool' => TRUE), 'path_case' => array('default' => 'none', 'translatable' => FALSE), 'trim_whitespace' => array('default' => FALSE, 'bool' => TRUE), 'alt' => array('default' => '', 'translatable' => TRUE), 'rel' => array('default' => ''), 'link_class' => array('default' => ''), 'prefix' => array('default' => '', 'translatable' => TRUE), 'suffix' => array('default' => '', 'translatable' => TRUE), 'target' => array('default' => ''), 'nl2br' => array('default' => FALSE, 'bool' => TRUE), 'max_length' => array('default' => ''), 'word_boundary' => array('default' => TRUE, 'bool' => TRUE), 'ellipsis' => array('default' => TRUE, 'bool' => TRUE), 'more_link' => array('default' => FALSE, 'bool' => TRUE), 'more_link_text' => array('default' => '', 'translatable' => TRUE), 'more_link_path' => array('default' => ''), 'strip_tags' => array('default' => FALSE, 'bool' => TRUE), 'trim' => array('default' => FALSE, 'bool' => TRUE), 'preserve_tags' => array('default' => ''), 'html' => array('default' => FALSE, 'bool' => TRUE))); $options['element_type'] = array('default' => ''); $options['element_class'] = array('default' => ''); $options['element_label_type'] = array('default' => ''); $options['element_label_class'] = array('default' => ''); $options['element_label_colon'] = array('default' => TRUE, 'bool' => TRUE); $options['element_wrapper_type'] = array('default' => ''); $options['element_wrapper_class'] = array('default' => ''); $options['element_default_classes'] = array('default' => TRUE, 'bool' => TRUE); $options['empty'] = array('default' => '', 'translatable' => TRUE); $options['hide_empty'] = array('default' => FALSE, 'bool' => TRUE); $options['empty_zero'] = array('default' => FALSE, 'bool' => TRUE); $options['hide_alter_empty'] = array('default' => TRUE, 'bool' => TRUE); return $options; }
protected function defineOptions() { $options = parent::defineOptions(); $options['operator'] = array('default' => '='); $options['value'] = array('default' => ''); $options['group'] = array('default' => '1'); $options['exposed'] = array('default' => FALSE); $options['expose'] = array('contains' => array('operator_id' => array('default' => FALSE), 'label' => array('default' => ''), 'description' => array('default' => ''), 'use_operator' => array('default' => FALSE), 'operator' => array('default' => ''), 'identifier' => array('default' => ''), 'required' => array('default' => FALSE), 'remember' => array('default' => FALSE), 'multiple' => array('default' => FALSE), 'remember_roles' => array('default' => array(RoleInterface::AUTHENTICATED_ID => RoleInterface::AUTHENTICATED_ID)))); // A group is a combination of a filter, an operator and a value // operating like a single filter. // Users can choose from a select box which group they want to apply. // Views will filter the view according to the defined values. // Because it acts as a standard filter, we have to define // an identifier and other settings like the widget and the label. // This settings are saved in another array to allow users to switch // between a normal filter and a group of filters with a single click. $options['is_grouped'] = array('default' => FALSE); $options['group_info'] = array('contains' => array('label' => array('default' => ''), 'description' => array('default' => ''), 'identifier' => array('default' => ''), 'optional' => array('default' => TRUE), 'widget' => array('default' => 'select'), 'multiple' => array('default' => FALSE), 'remember' => array('default' => 0), 'default_group' => array('default' => 'All'), 'default_group_multiple' => array('default' => array()), 'group_items' => array('default' => array()))); return $options; }
protected function defineOptions() { $options = parent::defineOptions(); $options['label'] = array('default' => ''); // Some styles (for example table) should have labels enabled by default. $style = $this->view->getStyle(); if (isset($style) && $style->defaultFieldLabels()) { $options['label']['default'] = $this->definition['title']; } $options['exclude'] = array('default' => FALSE); $options['alter'] = array('contains' => array('alter_text' => array('default' => FALSE), 'text' => array('default' => ''), 'make_link' => array('default' => FALSE), 'path' => array('default' => ''), 'absolute' => array('default' => FALSE), 'external' => array('default' => FALSE), 'replace_spaces' => array('default' => FALSE), 'path_case' => array('default' => 'none'), 'trim_whitespace' => array('default' => FALSE), 'alt' => array('default' => ''), 'rel' => array('default' => ''), 'link_class' => array('default' => ''), 'prefix' => array('default' => ''), 'suffix' => array('default' => ''), 'target' => array('default' => ''), 'nl2br' => array('default' => FALSE), 'max_length' => array('default' => 0), 'word_boundary' => array('default' => TRUE), 'ellipsis' => array('default' => TRUE), 'more_link' => array('default' => FALSE), 'more_link_text' => array('default' => ''), 'more_link_path' => array('default' => ''), 'strip_tags' => array('default' => FALSE), 'trim' => array('default' => FALSE), 'preserve_tags' => array('default' => ''), 'html' => array('default' => FALSE))); $options['element_type'] = array('default' => ''); $options['element_class'] = array('default' => ''); $options['element_label_type'] = array('default' => ''); $options['element_label_class'] = array('default' => ''); $options['element_label_colon'] = array('default' => TRUE); $options['element_wrapper_type'] = array('default' => ''); $options['element_wrapper_class'] = array('default' => ''); $options['element_default_classes'] = array('default' => TRUE); $options['empty'] = array('default' => ''); $options['hide_empty'] = array('default' => FALSE); $options['empty_zero'] = array('default' => FALSE); $options['hide_alter_empty'] = array('default' => TRUE); return $options; }
protected function defineOptions() { $options = parent::defineOptions(); $options['default_action'] = array('default' => 'ignore'); $options['exception'] = array('contains' => array('value' => array('default' => 'all'), 'title_enable' => array('default' => FALSE, 'bool' => TRUE), 'title' => array('default' => 'All', 'translatable' => TRUE))); $options['title_enable'] = array('default' => FALSE, 'bool' => TRUE); $options['title'] = array('default' => '', 'translatable' => TRUE); $options['default_argument_type'] = array('default' => 'fixed'); $options['default_argument_options'] = array('default' => array()); $options['default_argument_skip_url'] = array('default' => FALSE, 'bool' => TRUE); $options['summary_options'] = array('default' => array()); $options['summary'] = array('contains' => array('sort_order' => array('default' => 'asc'), 'number_of_records' => array('default' => 0), 'format' => array('default' => 'default_summary'))); $options['specify_validation'] = array('default' => FALSE, 'bool' => TRUE); $options['validate'] = array('contains' => array('type' => array('default' => 'none'), 'fail' => array('default' => 'not found'))); $options['validate_options'] = array('default' => array()); return $options; }