You are here

interface DashboardBlockInterface in Content Planner 8

Defines an interface for dashboard block plugins.

Hierarchy

Expanded class hierarchy of DashboardBlockInterface

All classes that implement DashboardBlockInterface

File

src/DashboardBlockInterface.php, line 12

Namespace

Drupal\content_planner
View source
interface DashboardBlockInterface extends PluginInspectionInterface {

  /**
   * Return the name of the block.
   *
   * @return string
   *   The name of the block.
   */
  public function getName();

  /**
   * Check if the plugin is configurable.
   *
   * @return bool
   *   TRUE if the block is configuratble, FALSE otherwise.
   */
  public function isConfigurable();

  /**
   * Get Configuration passed in by Plugin Manager.
   *
   * @return array
   *   The block configuration .
   */
  public function getConfiguration();

  /**
   * Build the block and return a renderable array.
   *
   * @return array
   *   The render array for the block.
   */
  public function build();

  /**
   * Add additonal form elements specific to the Plugin.
   *
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   * @param \Symfony\Component\HttpFoundation\Request $request
   *   The request.
   * @param array $block_configuration
   *   The block configuration.
   *
   * @return mixed
   *   Gets the config form fields.
   */
  public function getConfigSpecificFormFields(FormStateInterface &$form_state, Request &$request, array $block_configuration);

  /**
   * Validates teh plugin config form.
   *
   * @param array $form
   *   The form array passed by reference.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   */
  public function validateForm(array &$form, FormStateInterface &$form_state);

  /**
   * Submit form handler.
   *
   * @param array $form
   *   The form array passed by reference.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   */
  public function submitSettingsForm(array &$form, FormStateInterface &$form_state);

}

Members

Namesort descending Modifiers Type Description Overrides
DashboardBlockInterface::build public function Build the block and return a renderable array. 1
DashboardBlockInterface::getConfigSpecificFormFields public function Add additonal form elements specific to the Plugin. 1
DashboardBlockInterface::getConfiguration public function Get Configuration passed in by Plugin Manager. 1
DashboardBlockInterface::getName public function Return the name of the block. 1
DashboardBlockInterface::isConfigurable public function Check if the plugin is configurable.
DashboardBlockInterface::submitSettingsForm public function Submit form handler. 1
DashboardBlockInterface::validateForm public function Validates teh plugin config form. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2