You are here

interface SharethisManagerInterface in ShareThis 8.2

Interface for SharethisManager.

Hierarchy

Expanded class hierarchy of SharethisManagerInterface

All classes that implement SharethisManagerInterface

4 files declare their use of SharethisManagerInterface
SharethisBlock.php in src/Plugin/Block/SharethisBlock.php
SharethisConfigurationForm.php in src/Form/SharethisConfigurationForm.php
SharethisNode.php in src/Plugin/views/field/SharethisNode.php
SharethisWidgetBlock.php in src/Plugin/Block/SharethisWidgetBlock.php

File

src/SharethisManagerInterface.php, line 8

Namespace

Drupal\sharethis
View source
interface SharethisManagerInterface {

  /**
   * Determine if connection should be refreshed.
   *
   * @return array
   *   Returns the list of options that sharethis provides.
   */
  public function getOptions();

  /**
   * Custom html block.
   *
   * @return array
   *   Return array renderable by renderSpans().
   */
  public function blockContents();

  /**
   * Custom html markup for widget.
   *
   * @param array $array
   *   Settings array.
   *
   * @return array
   *   Return array renderable by renderSpans().
   */
  public function widgetContents(array $array);

  /**
   * Include st js scripts.
   */
  public function sharethisIncludeJs();

  /**
   * Function is creating options to be passed to stLight.
   *
   * @param array $data_options
   *   The settings selected by publisher in admin panel.
   *
   * @return array
   *   An array of options.
   */
  public function getShareThisLightOptions(array $data_options);

  /**
   * Converts given value to boolean.
   *
   * @param string $val
   *   Which value to convert to boolean.
   *
   * @return bool
   *   Return TRUE or FALSE.
   *
   * @todo To be replaced with bool
   */
  public function toBoolean($val);

  /**
   * Custom html block.
   *
   * @param array $array
   *   Settings array.
   * @param string $title
   *   Title string.
   * @param string $string
   *   Sharethis path.
   *
   * @return array
   *   Array with options, title and path.
   */
  public function renderSpans(array $array, $title, $string);

}

Members

Namesort descending Modifiers Type Description Overrides
SharethisManagerInterface::blockContents public function Custom html block. 1
SharethisManagerInterface::getOptions public function Determine if connection should be refreshed. 1
SharethisManagerInterface::getShareThisLightOptions public function Function is creating options to be passed to stLight. 1
SharethisManagerInterface::renderSpans public function Custom html block. 1
SharethisManagerInterface::sharethisIncludeJs public function Include st js scripts. 1
SharethisManagerInterface::toBoolean public function Converts given value to boolean. 1
SharethisManagerInterface::widgetContents public function Custom html markup for widget. 1