vms_plugin_argument_default_mlid.inc in Views Menu Support 8
Contains argument default plugin for getting current MLID items.
Namespace
Drupal\vms\Plugins\views\views_mlidFile
lib/Drupal/vms/Plugins/views/vms_plugin_argument_default_mlid.incView source
<?php
/**
* @file
* Contains argument default plugin for getting current MLID items.
*/
namespace Drupal\vms\Plugins\views\views_mlid;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Component\Plugin\Plugin;
/**
* Default argument plugin to provide current mlid item.
*/
class vms_plugin_argument_default_mlid extends views_plugin_argument_default {
function option_definition() {
$options = parent::option_definition();
$options['trail'] = array(
'default' => 'current',
);
return $options;
}
function options_form(&$form, &$form_state) {
$form['trail'] = array(
'#type' => 'select',
'#title' => t('Menu item(s) to return'),
'#default_value' => $this->options['trail'],
'#options' => vms_mlid_query_types(),
);
}
function get_argument() {
return $this->options['trail'];
}
}
Classes
Name | Description |
---|---|
vms_plugin_argument_default_mlid | Default argument plugin to provide current mlid item. |