You are here

interface DemoContentInterface in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  2. 8 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  3. 8.2 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  4. 8.3 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  5. 8.4 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  6. 8.5 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  7. 8.6 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  8. 8.8 modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  9. 10.3.x modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  10. 10.0.x modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  11. 10.1.x modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface
  12. 10.2.x modules/custom/social_demo/src/DemoContentInterface.php \Drupal\social_demo\DemoContentInterface

Interface DemoContentInterface.

@package Drupal\social_demo

Hierarchy

Expanded class hierarchy of DemoContentInterface

All classes that implement DemoContentInterface

File

modules/custom/social_demo/src/DemoContentInterface.php, line 14

Namespace

Drupal\social_demo
View source
interface DemoContentInterface extends PluginInspectionInterface, ContainerFactoryPluginInterface {

  /**
   * Returns the file name.
   *
   * @return string
   *   The source filename where are data.
   */
  public function getSource();

  /**
   * Sets the used profile.
   *
   * @param string $profile
   *   The profile.
   *
   * @return string
   *   Void.
   */
  public function setProfile($profile);

  /**
   * Returns the profile.
   *
   * @return string
   *   The used demo content profile.
   */
  public function getProfile();

  /**
   * Returns the module name.
   *
   * @return string
   *   The module name where is placed file with data.
   */
  public function getModule();

  /**
   * Creates content.
   *
   * @return array
   *   An array with list of created entities.
   */
  public function createContent();

  /**
   * Removes content.
   */
  public function removeContent();

  /**
   * Returns quantity of created items.
   *
   * @return int
   *   Returns quantity of created items.
   */
  public function count();

  /**
   * Set entity storage.
   *
   * @param \Drupal\Core\Entity\EntityStorageInterface $entity_storage
   *   The EntityStorageInterface entity_storage.
   */
  public function setEntityStorage(EntityStorageInterface $entity_storage);

  /**
   * Scramble it.
   *
   * @param array $data
   *   The data array to scramble.
   * @param int|null $max
   *   How many items to generate.
   *
   * @return array
   *   An array with list of data.
   */
  public function scrambleData(array $data, $max = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
DemoContentInterface::count public function Returns quantity of created items. 1
DemoContentInterface::createContent public function Creates content. 8
DemoContentInterface::getModule public function Returns the module name. 1
DemoContentInterface::getProfile public function Returns the profile. 1
DemoContentInterface::getSource public function Returns the file name. 1
DemoContentInterface::removeContent public function Removes content. 1
DemoContentInterface::scrambleData public function Scramble it. 1
DemoContentInterface::setEntityStorage public function Set entity storage. 1
DemoContentInterface::setProfile public function Sets the used profile. 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