updated contrib modules
This commit is contained in:
@@ -9,18 +9,29 @@
|
||||
* Tests a dynamic access plugin.
|
||||
*/
|
||||
class views_test_plugin_access_test_dynamic extends views_plugin_access {
|
||||
function option_definition() {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function option_definition() {
|
||||
$options = parent::option_definition();
|
||||
$options['access'] = array('default' => FALSE, 'bool' => TRUE);
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
function access($account) {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function access($account) {
|
||||
return !empty($this->options['access']) && isset($this->view->args[0]) && $this->view->args[0] == variable_get('test_dynamic_access_argument1', NULL) && isset($this->view->args[1]) && $this->view->args[1] == variable_get('test_dynamic_access_argument2', NULL);
|
||||
}
|
||||
|
||||
function get_access_callback() {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_access_callback() {
|
||||
return array('views_test_test_dynamic_access_callback', array(!empty($options['access']), 1, 2));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -9,18 +9,29 @@
|
||||
* Tests a static access plugin.
|
||||
*/
|
||||
class views_test_plugin_access_test_static extends views_plugin_access {
|
||||
function option_definition() {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function option_definition() {
|
||||
$options = parent::option_definition();
|
||||
$options['access'] = array('default' => FALSE, 'bool' => TRUE);
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
function access($account) {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function access($account) {
|
||||
return !empty($this->options['access']);
|
||||
}
|
||||
|
||||
function get_access_callback() {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_access_callback() {
|
||||
return array('views_test_test_static_access_callback', array(!empty($options['access'])));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
class views_test_plugin_style_test_mapping extends views_plugin_style_mapping {
|
||||
|
||||
/**
|
||||
* Overrides views_plugin_style_mapping::define_mapping().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function define_mapping() {
|
||||
return array(
|
||||
@@ -49,4 +49,5 @@ class views_test_plugin_style_test_mapping extends views_plugin_style_mapping {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user