本文整理汇总了PHP中Drupal\views\Plugin\views\PluginBase::defineOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginBase::defineOptions方法的具体用法?PHP PluginBase::defineOptions怎么用?PHP PluginBase::defineOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\views\Plugin\views\PluginBase
的用法示例。
在下文中一共展示了PluginBase::defineOptions方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defineOptions
/**
* {@inheritdoc}
*/
protected function defineOptions()
{
$options = parent::defineOptions();
if (isset($this->base_table)) {
$options['relationship'] = array('default' => 'none');
}
return $options;
}
示例2: defineOptions
protected function defineOptions()
{
$options = parent::defineOptions();
$options['submit_button'] = array('default' => 'Apply', 'translatable' => TRUE);
$options['reset_button'] = array('default' => FALSE, 'bool' => TRUE);
$options['reset_button_label'] = array('default' => 'Reset', 'translatable' => TRUE);
$options['exposed_sorts_label'] = array('default' => 'Sort by', 'translatable' => TRUE);
$options['expose_sort_order'] = array('default' => TRUE, 'bool' => TRUE);
$options['sort_asc_label'] = array('default' => 'Asc', 'translatable' => TRUE);
$options['sort_desc_label'] = array('default' => 'Desc', 'translatable' => TRUE);
return $options;
}
示例3: defineOptions
protected function defineOptions()
{
$options = parent::defineOptions();
$options['submit_button'] = array('default' => $this->t('Apply'));
$options['reset_button'] = array('default' => FALSE);
$options['reset_button_label'] = array('default' => $this->t('Reset'));
$options['exposed_sorts_label'] = array('default' => $this->t('Sort by'));
$options['expose_sort_order'] = array('default' => TRUE);
$options['sort_asc_label'] = array('default' => $this->t('Asc'));
$options['sort_desc_label'] = array('default' => $this->t('Desc'));
return $options;
}
示例4: defineOptions
protected function defineOptions()
{
$options = parent::defineOptions();
$options['grouping'] = array('default' => array());
if ($this->usesRowClass()) {
$options['row_class'] = array('default' => '');
$options['default_row_class'] = array('default' => TRUE);
}
$options['uses_fields'] = array('default' => FALSE);
return $options;
}
示例5: defineOptions
protected function defineOptions()
{
$options = parent::defineOptions();
$options['id'] = array('default' => '');
$options['table'] = array('default' => '');
$options['field'] = array('default' => '');
$options['relationship'] = array('default' => 'none');
$options['group_type'] = array('default' => 'group');
$options['admin_label'] = array('default' => '');
return $options;
}