Commit 046bf09b authored by alexpott's avatar alexpott

Issue #1922966 by jibran, damiankloip: Remove 'bool' and 'translatable' key...

Issue #1922966 by jibran, damiankloip: Remove 'bool' and 'translatable' key from option definitions.
parent d2cbadc1
......@@ -52,8 +52,8 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_comment'] = array('default' => TRUE, 'bool' => TRUE);
$options['link_to_entity'] = array('default' => FALSE, 'bool' => TRUE);
$options['link_to_comment'] = array('default' => TRUE);
$options['link_to_entity'] = array('default' => FALSE);
return $options;
}
......
......@@ -29,7 +29,7 @@ class EntityLink extends FieldPluginBase {
protected function defineOptions() {
$options = parent::defineOptions();
$options['teaser'] = array('default' => FALSE, 'bool' => TRUE);
$options['teaser'] = array('default' => FALSE);
return $options;
}
......
......@@ -61,8 +61,8 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
protected function defineOptions() {
$options = parent::defineOptions();
$options['text'] = array('default' => '', 'translatable' => TRUE);
$options['link_to_entity'] = array('default' => FALSE, 'bool' => TRUE);
$options['text'] = array('default' => '');
$options['link_to_entity'] = array('default' => FALSE);
return $options;
}
......
......@@ -21,7 +21,7 @@ class LinkEdit extends Link {
protected function defineOptions() {
$options = parent::defineOptions();
$options['destination'] = array('default' => FALSE, 'bool' => TRUE);
$options['destination'] = array('default' => FALSE);
return $options;
}
......
......@@ -78,7 +78,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_comment'] = array('default' => TRUE, 'bool' => TRUE);
$options['link_to_comment'] = array('default' => TRUE);
return $options;
}
......
......@@ -51,7 +51,7 @@ public function query() {
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_user'] = array('default' => TRUE, 'bool' => TRUE);
$options['link_to_user'] = array('default' => TRUE);
return $options;
}
......
......@@ -36,7 +36,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_user'] = array('default' => TRUE, 'bool' => TRUE);
$options['link_to_user'] = array('default' => TRUE);
return $options;
}
......
......@@ -26,7 +26,7 @@ class TranslationLink extends FieldPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['text'] = array('default' => '', 'translatable' => TRUE);
$options['text'] = array('default' => '');
return $options;
}
......
......@@ -39,7 +39,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['replace_variables'] = array('default' => TRUE, 'bool' => TRUE);
$options['replace_variables'] = array('default' => TRUE);
return $options;
}
......
......@@ -46,7 +46,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['summary']['contains']['human'] = array('default' => FALSE, 'bool' => TRUE);
$options['summary']['contains']['human'] = array('default' => FALSE);
return $options;
}
......
......@@ -47,7 +47,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['summary']['contains']['human'] = array('default' => FALSE, 'bool' => TRUE);
$options['summary']['contains']['human'] = array('default' => FALSE);
return $options;
}
......
......@@ -400,7 +400,6 @@ protected function defineOptions() {
// Options used for multiple value fields.
$options['group_rows'] = array(
'default' => TRUE,
'bool' => TRUE,
);
// If we know the exact number of allowed values, then that can be
// the default. Otherwise, default to 'all'.
......@@ -412,11 +411,9 @@ protected function defineOptions() {
);
$options['delta_reversed'] = array(
'default' => FALSE,
'bool' => TRUE,
);
$options['delta_first_last'] = array(
'default' => FALSE,
'bool' => TRUE,
);
$options['multi_type'] = array(
......@@ -428,7 +425,6 @@ protected function defineOptions() {
$options['field_api_classes'] = array(
'default' => FALSE,
'bool' => TRUE,
);
return $options;
......
......@@ -25,7 +25,7 @@ class Extension extends FieldPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['extension_detect_tar'] = array('default' => FALSE, 'bool' => TRUE);
$options['extension_detect_tar'] = array('default' => FALSE);
return $options;
}
......
......@@ -35,7 +35,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_file'] = array('default' => FALSE, 'bool' => TRUE);
$options['link_to_file'] = array('default' => FALSE);
return $options;
}
......
......@@ -21,7 +21,7 @@ class FileMime extends File {
protected function defineOptions() {
$options = parent::defineOptions();
$options['filemime_image'] = array('default' => FALSE, 'bool' => TRUE);
$options['filemime_image'] = array('default' => FALSE);
return $options;
}
......
......@@ -19,7 +19,7 @@ class Uri extends File {
protected function defineOptions() {
$options = parent::defineOptions();
$options['file_download_path'] = array('default' => FALSE, 'bool' => TRUE);
$options['file_download_path'] = array('default' => FALSE);
return $options;
}
......
......@@ -50,7 +50,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['comments'] = array('default' => FALSE, 'bool' => TRUE);
$options['comments'] = array('default' => FALSE);
return $options;
}
......
......@@ -22,7 +22,7 @@ class Language extends Node {
protected function defineOptions() {
$options = parent::defineOptions();
$options['native_language'] = array('default' => FALSE, 'bool' => TRUE);
$options['native_language'] = array('default' => FALSE);
return $options;
}
......
......@@ -29,7 +29,7 @@ public function usesGroupBy() {
protected function defineOptions() {
$options = parent::defineOptions();
$options['text'] = array('default' => '', 'translatable' => TRUE);
$options['text'] = array('default' => '');
return $options;
}
......
......@@ -38,7 +38,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_node'] = array('default' => isset($this->definition['link_to_node default']) ? $this->definition['link_to_node default'] : FALSE, 'bool' => TRUE);
$options['link_to_node'] = array('default' => isset($this->definition['link_to_node default']) ? $this->definition['link_to_node default'] : FALSE);
return $options;
}
......
......@@ -33,7 +33,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['absolute'] = array('default' => FALSE, 'bool' => TRUE);
$options['absolute'] = array('default' => FALSE);
return $options;
}
......
......@@ -35,7 +35,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
}
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_node_revision'] = array('default' => FALSE, 'bool' => TRUE);
$options['link_to_node_revision'] = array('default' => FALSE);
return $options;
}
......
......@@ -22,7 +22,7 @@ class Type extends Node {
protected function defineOptions() {
$options = parent::defineOptions();
$options['machine_name'] = array('default' => FALSE, 'bool' => TRUE);
$options['machine_name'] = array('default' => FALSE);
return $options;
}
......
......@@ -27,7 +27,7 @@ class SearchRow extends RowPluginBase {
protected function defineOptions() {
$options = parent::defineOptions();
$options['score'] = array('default' => TRUE, 'bool' => TRUE);
$options['score'] = array('default' => TRUE);
return $options;
}
......
......@@ -80,7 +80,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['action_title'] = array('default' => 'With selection', 'translatable' => TRUE);
$options['action_title'] = array('default' => 'With selection');
$options['include_exclude'] = array(
'default' => 'exclude',
);
......
......@@ -27,8 +27,8 @@ protected function defineOptions() {
$options = parent::defineOptions();
$options['depth'] = array('default' => 0);
$options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE);
$options['use_taxonomy_term_path'] = array('default' => FALSE, 'bool' => TRUE);
$options['break_phrase'] = array('default' => FALSE);
$options['use_taxonomy_term_path'] = array('default' => FALSE);
return $options;
}
......
......@@ -47,10 +47,10 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['term_page'] = array('default' => TRUE, 'bool' => TRUE);
$options['node'] = array('default' => FALSE, 'bool' => TRUE);
$options['term_page'] = array('default' => TRUE);
$options['node'] = array('default' => FALSE);
$options['anyall'] = array('default' => ',');
$options['limit'] = array('default' => FALSE, 'bool' => TRUE);
$options['limit'] = array('default' => FALSE);
$options['vids'] = array('default' => array());
return $options;
......
......@@ -46,7 +46,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['transform'] = array('default' => FALSE, 'bool' => TRUE);
$options['transform'] = array('default' => FALSE);
return $options;
}
......
......@@ -36,7 +36,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['text'] = array('default' => '', 'translatable' => TRUE);
$options['text'] = array('default' => '');
return $options;
}
......
......@@ -41,8 +41,8 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_taxonomy'] = array('default' => FALSE, 'bool' => TRUE);
$options['convert_spaces'] = array('default' => FALSE, 'bool' => TRUE);
$options['link_to_taxonomy'] = array('default' => FALSE);
$options['convert_spaces'] = array('default' => FALSE);
return $options;
}
......
......@@ -40,8 +40,8 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_taxonomy'] = array('default' => TRUE, 'bool' => TRUE);
$options['limit'] = array('default' => FALSE, 'bool' => TRUE);
$options['link_to_taxonomy'] = array('default' => TRUE);
$options['limit'] = array('default' => FALSE);
$options['vids'] = array('default' => array());
return $options;
......
......@@ -46,10 +46,10 @@ protected function defineOptions() {
$options = parent::defineOptions();
$options['type'] = array('default' => 'textfield');
$options['limit'] = array('default' => TRUE, 'bool' => TRUE);
$options['limit'] = array('default' => TRUE);
$options['vid'] = array('default' => '');
$options['hierarchy'] = array('default' => 0);
$options['error_message'] = array('default' => TRUE, 'bool' => TRUE);
$options['error_message'] = array('default' => TRUE);
return $options;
}
......
......@@ -29,7 +29,7 @@ class User extends ArgumentDefaultPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['user'] = array('default' => '', 'bool' => TRUE, 'translatable' => FALSE);
$options['user'] = array('default' => '');
return $options;
}
......
......@@ -43,7 +43,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['restrict_roles'] = array('default' => FALSE, 'bool' => TRUE);
$options['restrict_roles'] = array('default' => FALSE);
$options['roles'] = array('default' => array());
return $options;
......
......@@ -42,7 +42,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['text'] = array('default' => '', 'translatable' => TRUE);
$options['text'] = array('default' => '');
return $options;
}
......
......@@ -39,9 +39,9 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['overwrite_anonymous'] = array('default' => FALSE, 'bool' => TRUE);
$options['anonymous_text'] = array('default' => '', 'translatable' => TRUE);
$options['format_username'] = array('default' => TRUE, 'bool' => TRUE);
$options['overwrite_anonymous'] = array('default' => FALSE);
$options['anonymous_text'] = array('default' => '');
$options['format_username'] = array('default' => TRUE);
return $options;
}
......
......@@ -35,7 +35,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
protected function defineOptions() {
$options = parent::defineOptions();
$options['link_to_user'] = array('default' => TRUE, 'bool' => TRUE);
$options['link_to_user'] = array('default' => TRUE);
return $options;
}
......
......@@ -31,7 +31,7 @@ function __construct($handler) {
}
public static function defineOptions(&$options) {
$options['reduce_duplicates'] = array('default' => FALSE, 'bool' => TRUE);
$options['reduce_duplicates'] = array('default' => FALSE);
}
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
......
......@@ -164,7 +164,7 @@ protected function defineOptions() {
$options['field'] = array('default' => '');
$options['relationship'] = array('default' => 'none');
$options['group_type'] = array('default' => 'group');
$options['admin_label'] = array('default' => '', 'translatable' => TRUE);
$options['admin_label'] = array('default' => '');
$options['dependencies'] = array('default' => array());
return $options;
......
......@@ -137,13 +137,11 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
* @code
* 'option_name' => array(
* - 'default' => default value,
* - 'translatable' => (optional) TRUE/FALSE (wrap in $this->t() on export if true),
* - 'contains' => (optional) array of items this contains, with its own
* defaults, etc. If contains is set, the default will be ignored and
* assumed to be array().
* - 'bool' => (optional) TRUE/FALSE Is the value a boolean value. This will
* change the export format to TRUE/FALSE instead of 1/0.
* ),
* @endcode
*
* @return array
* Returns the options of this handler/plugin.
......
......@@ -67,7 +67,7 @@ protected function 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, 'bool' => TRUE);
$options['empty'] = array('default' => FALSE);
return $options;
}
......
......@@ -29,7 +29,6 @@ protected function defineOptions() {
$options['content'] = array(
'default' => 'Displaying @start - @end of @total',
'translatable' => TRUE,
);
return $options;
......
......@@ -23,7 +23,7 @@ class Text extends TokenizeAreaPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['content'] = array('default' => '', 'translatable' => TRUE, 'format_key' => 'format');
$options['content'] = array('default' => '', 'format_key' => 'format');
$options['format'] = array('default' => NULL);
return $options;
}
......
......@@ -23,7 +23,7 @@ class TextCustom extends TokenizeAreaPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['content'] = array('default' => '', 'translatable' => TRUE);
$options['content'] = array('default' => '');
return $options;
}
......
......@@ -24,7 +24,7 @@ class Title extends AreaPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['title'] = array('default' => '', 'translatable' => TRUE);
$options['title'] = array('default' => '');
return $options;
}
......
......@@ -26,7 +26,7 @@ abstract class TokenizeAreaPluginBase extends AreaPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['tokenize'] = array('default' => FALSE, 'bool' => TRUE);
$options['tokenize'] = array('default' => FALSE);
return $options;
}
......
......@@ -72,7 +72,7 @@ protected function defineOptions() {
$options = parent::defineOptions();
$options['view_to_insert'] = array('default' => '');
$options['inherit_arguments'] = array('default' => FALSE, 'bool' => TRUE);
$options['inherit_arguments'] = array('default' => FALSE);
return $options;
}
......
......@@ -122,15 +122,15 @@ protected function defineOptions() {
$options['exception'] = array(
'contains' => array(
'value' => array('default' => 'all'),
'title_enable' => array('default' => FALSE, 'bool' => TRUE),
'title' => array('default' => 'All', 'translatable' => TRUE),
'title_enable' => array('default' => FALSE),
'title' => array('default' => 'All'),
),
);
$options['title_enable'] = array('default' => FALSE, 'bool' => TRUE);
$options['title'] = array('default' => '', 'translatable' => TRUE);
$options['title_enable'] = array('default' => FALSE);
$options['title'] = array('default' => '');
$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['default_argument_skip_url'] = array('default' => FALSE);
$options['summary_options'] = array('default' => array());
$options['summary'] = array(
'contains' => array(
......@@ -139,7 +139,7 @@ protected function defineOptions() {
'format' => array('default' => 'default_summary'),
),
);
$options['specify_validation'] = array('default' => FALSE, 'bool' => TRUE);
$options['specify_validation'] = array('default' => FALSE);
$options['validate'] = array(
'contains' => array(
'type' => array('default' => 'none'),
......
......@@ -46,11 +46,11 @@ protected function defineOptions() {
$options = parent::defineOptions();
if (!empty($this->definition['numeric'])) {
$options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE);
$options['break_phrase'] = array('default' => FALSE);
}
$options['add_table'] = array('default' => FALSE, 'bool' => TRUE);
$options['require_value'] = array('default' => FALSE, 'bool' => TRUE);
$options['add_table'] = array('default' => FALSE);
$options['require_value'] = array('default' => FALSE);
if (isset($this->helper)) {
$this->helper->defineOptions($options);
......
......@@ -20,7 +20,7 @@ class Null extends ArgumentPluginBase {
protected function defineOptions() {
$options = parent::defineOptions();
$options['must_not_be'] = array('default' => FALSE, 'bool' => TRUE);
$options['must_not_be'] = array('default' => FALSE);
return $options;
}
......
......@@ -34,8 +34,8 @@ class Numeric extends ArgumentPluginBase {
protected function defineOptions() {
$options = parent::defineOptions();
$options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE);
$options['not'] = array('default' => FALSE, 'bool' => TRUE);
$options['break_phrase'] = array('default' => FALSE);
$options['not'] = array('default' => FALSE);