class hosting_package_plugin_access

Access plugin that provides access control for package views.

Hierarchy

Expanded class hierarchy of hosting_package_plugin_access

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
hosting_package_plugin_access::access function Determine if the current user has access or not.
hosting_package_plugin_access::get_access_callback function Determine the access callback and arguments.
hosting_package_plugin_access::summary_title function Return a string to display as the clickable title for the access control.

File

package/includes/views/plugins/hosting_package_plugin_access.inc, line 6

View source
class hosting_package_plugin_access extends views_plugin_access {

  /**
   * Return a string to display as the clickable title for the
   * access control.
   */
  function summary_title() {
    return t('Hosting package');
  }

  /**
   * Determine the access callback and arguments.
   *
   * This information will be embedded in the menu in order to reduce
   * performance hits during menu item access testing, which happens
   * a lot.
   *
   * @return an array; the first item should be the function to call,
   *   and the second item should be an array of arguments. The first
   *   item may also be TRUE (bool only) which will indicate no
   *   access control.)
   */
  function get_access_callback() {
    return array('hosting_package_views_access', array($this->display->display_plugin, $this->display->id));
  }

  /**
   * Determine if the current user has access or not.
   */
  function access($account) {
    return hosting_package_views_access($this->display->display_plugin, $this->display->id, $account);
  }

}