本文整理匯總了PHP中Drupal\views\Plugin\views\display\DisplayPluginBase::defineOptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP DisplayPluginBase::defineOptions方法的具體用法?PHP DisplayPluginBase::defineOptions怎麽用?PHP DisplayPluginBase::defineOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Drupal\views\Plugin\views\display\DisplayPluginBase
的用法示例。
在下文中一共展示了DisplayPluginBase::defineOptions方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: defineOptions
/**
* {@inheritdoc}
*/
protected function defineOptions()
{
$options = parent::defineOptions();
$options['block_description'] = array('default' => '');
$options['block_category'] = array('default' => $this->t('Lists (Views)'));
$options['block_hide_empty'] = array('default' => FALSE);
$options['allow'] = array('contains' => array('items_per_page' => array('default' => 'items_per_page')));
return $options;
}
示例2: defineOptions
protected function defineOptions()
{
$options = parent::defineOptions();
$options['displays'] = array('default' => array());
$options['attachment_position'] = array('default' => 'before');
$options['inherit_arguments'] = array('default' => TRUE, 'bool' => TRUE);
$options['inherit_exposed_filters'] = array('default' => FALSE, 'bool' => TRUE);
$options['inherit_pager'] = array('default' => FALSE, 'bool' => TRUE);
$options['render_pager'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
示例3: defineOptions
/**
* Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::defineOptions().
*/
protected function defineOptions()
{
$options = parent::defineOptions();
// Force the style plugin to 'entity_reference_style' and the row plugin to
// 'fields'.
$options['style']['contains']['type'] = array('default' => 'entity_reference');
$options['defaults']['default']['style'] = FALSE;
$options['row']['contains']['type'] = array('default' => 'entity_reference');
$options['defaults']['default']['row'] = FALSE;
// Make sure the query is not cached.
$options['defaults']['default']['cache'] = FALSE;
// Set the display title to an empty string (not used in this display type).
$options['title']['default'] = '';
$options['defaults']['default']['title'] = FALSE;
return $options;
}
示例4: defineOptions
/**
* {@inheritdoc}
*/
protected function defineOptions()
{
$options = parent::defineOptions();
$options['test_option'] = array('default' => '');
return $options;
}
示例5: defineOptions
/**
* Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase:defineOptions().
*/
protected function defineOptions()
{
$options = parent::defineOptions();
$options['path'] = array('default' => '');
$options['route_name'] = array('default' => '');
return $options;
}