You are here

interface BoxTypePluginInterface in Boxes 7.2

Interface for Plugin Classes

Hierarchy

Expanded class hierarchy of BoxTypePluginInterface

All classes that implement BoxTypePluginInterface

1 string reference to 'BoxTypePluginInterface'
boxes_check_plugin_class in ./boxes.module
Check the plugin type class

File

includes/boxes.core.inc, line 11
Box classes and plugin interface

View source
interface BoxTypePluginInterface {

  /**
   * Constructor
   *
   * Plugin info should be called using boxes_fetch_plugin_info().
   *
   * @abstract
   *
   * @param  $plugin_info array of information from the ctools plugin.
   */
  public function __construct($plugin_info);

  /**
   * Get the ctools plugin info.
   *
   * If you pass in a key, then the key from the plugin info will be returned
   * otherwise the entire plugin will be returned
   *
   * @abstract
   *
   * @param  $key
   * @return array of plugin info for value from a key
   */
  public function getInfo($key = NULL);

  /**
   * Build the URL string for the plugin
   *
   * @abstract
   *
   * @return url
   */
  public function buildURL();

  /**
   * Get the label name of the plugin
   *
   * @abstract
   *
   * @return label of the type
   */
  public function getLabel();

  /**
   * Get the description of the plugin
   *
   * @abstract
   *
   * @return description of the type
   */
  public function getDescription();

  /**
   * Set the Box object for later use
   *
   * @abstract
   *
   * @param Box $box
   */
  public function setBox($box);

  /**
   * Is this type editable?
   *
   * @abstract
   *
   * @return boolean
   */
  public function isEditable();

  /**
   * Define the form values and their defaults
   */
  public function values();

  /**
   * The Plugin Form
   *
   * The Box object will be either loaded from the database or filled with the defaults.
   *
   * @param $box
   * @param $form
   * @param $form_state
   * @return form array
   */
  public function form($box, $form, &$form_state);

  /**
   * Validate function for box type form
   *
   * @abstract
   *
   * @param  $values
   * @param $form_state
   */
  public function validate($values, &$form_state);

  /**
   * React to a box being saved
   *
   * @abstract
   *
   * @param Box $box
   */
  public function submit(Box $box);

  /**
   * Return the block content.
   *
   * @abstract
   *
   * @param $box
   *   The box object being viewed.
   * @param $content
   *   The default content array created by Entity API.  This will include any
   *   fields attached to the entity.
   * @param $view_mode
   *   The view mode passed into $entity->view().
   * @return
   *   Return a renderable content array.
   */
  public function view($box, $content, $view_mode = 'default', $langcode = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
BoxTypePluginInterface::buildURL public function Build the URL string for the plugin 1
BoxTypePluginInterface::form public function The Plugin Form 1
BoxTypePluginInterface::getDescription public function Get the description of the plugin 1
BoxTypePluginInterface::getInfo public function Get the ctools plugin info. 1
BoxTypePluginInterface::getLabel public function Get the label name of the plugin 1
BoxTypePluginInterface::isEditable public function Is this type editable? 1
BoxTypePluginInterface::setBox public function Set the Box object for later use 1
BoxTypePluginInterface::submit public function React to a box being saved 1
BoxTypePluginInterface::validate public function Validate function for box type form 1
BoxTypePluginInterface::values public function Define the form values and their defaults 1
BoxTypePluginInterface::view public function Return the block content. 1
BoxTypePluginInterface::__construct public function Constructor 1