本文整理匯總了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;
}