You are here

interface FormsStepsInterface in Forms Steps 8

Interface FormsStepsInterface.

@package Drupal\forms_steps

Hierarchy

Expanded class hierarchy of FormsStepsInterface

All classes that implement FormsStepsInterface

3 files declare their use of FormsStepsInterface
FormsSteps.php in src/Entity/FormsSteps.php
FormsStepsProgressStepDeleteForm.php in src/Form/FormsStepsProgressStepDeleteForm.php
FormsStepsStepDeleteForm.php in src/Form/FormsStepsStepDeleteForm.php

File

src/FormsStepsInterface.php, line 12

Namespace

Drupal\forms_steps
View source
interface FormsStepsInterface extends ConfigEntityInterface {

  /**
   * Adds a step to the forms_steps.
   *
   * @param string $step_id
   *   The step's ID.
   * @param string $label
   *   The step's label.
   * @param string $entityType
   *   The step's entity type.
   * @param string $entityBundle
   *   The step's bundle.
   * @param string $formMode
   *   The step's form_mode.
   * @param string $url
   *   The step's URL.
   *
   * @return \Drupal\forms_steps\FormsStepsInterface
   *   The forms_steps entity.
   */
  public function addStep($step_id, $label, $entityType, $entityBundle, $formMode, $url);

  /**
   * Adds a progress step to the forms_steps.
   *
   * @param string $progress_step_id
   *   The progress step's ID.
   * @param string $label
   *   The progress step's label.
   * @param array $routes
   *   The progress step's active routes.
   * @param string $link
   *   The progress step's link.
   * @param array $link_visibility
   *   The progress step's link visibility.
   *
   * @return \Drupal\forms_steps\FormsStepsInterface
   *   The forms_steps entity.
   */
  public function addProgressStep($progress_step_id, $label, array $routes, $link, array $link_visibility);

  /**
   * Determines if the forms_steps has a step with the provided ID.
   *
   * @param string $step_id
   *   The step's ID.
   *
   * @return bool
   *   TRUE if the forms_steps has a step with the provided ID, FALSE if not.
   */
  public function hasStep($step_id);

  /**
   * Determines if the forms_steps has a progress step with the provided ID.
   *
   * @param string $progress_step_id
   *   The progress step's ID.
   *
   * @return bool
   *   TRUE if the forms_steps has a progress step with the provided ID, FALSE
   *   if not.
   */
  public function hasProgressStep($progress_step_id);

  /**
   * Returns the current step route.
   *
   * @param \Drupal\forms_steps\Step $step
   *   Current Step.
   *
   * @return null|string
   *   Returns the current route.
   */
  public function getStepRoute(Step $step);

  /**
   * Returns the next step route.
   *
   * @param \Drupal\forms_steps\Step $step
   *   Current Step.
   *
   * @return null|string
   *   Returns the next route.
   */
  public function getNextStepRoute(Step $step);

  /**
   * Gets step objects for the provided step IDs.
   *
   * @param string[] $step_ids
   *   A list of step IDs to get. If NULL then all steps will be returned.
   *
   * @return \Drupal\forms_steps\StepInterface[]
   *   An array of forms_steps steps.
   *
   * @throws \InvalidArgumentException
   *   Thrown if $step_ids contains a step ID that does not exist.
   */
  public function getSteps(array $step_ids = NULL);

  /**
   * Gets progress step objects for the provided progress step IDs.
   *
   * @param string[] $progress_step_ids
   *   A list of progress step IDs to get. If NULL then all progress steps will
   *   be returned.
   *
   * @return \Drupal\forms_steps\ProgressStepInterface[]
   *   An array of forms_steps progress steps.
   *
   * @throws \InvalidArgumentException
   *   Thrown if $progress_step_ids contains a progress step ID that does not
   *   exist.
   */
  public function getProgressSteps(array $progress_step_ids = NULL);

  /**
   * Retrieve the last step defined on a forms steps entity.
   *
   * @param string $steps
   *   The forms_steps steps' IDs.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps step.
   */
  public function getLastStep($steps = NULL);

  /**
   * Retrieve the first step defined on a forms steps entity.
   *
   * @param string $steps
   *   The forms_steps steps' IDs.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps step.
   */
  public function getFirstStep($steps = NULL);

  /**
   * Gets a forms_steps step.
   *
   * @param string $step_id
   *   The step's ID.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps step.
   *
   * @throws \InvalidArgumentException
   *   Thrown if $step_id does not exist.
   */
  public function getStep($step_id);

  /**
   * Gets a forms_steps progress step.
   *
   * @param string $progress_step_id
   *   The progress step's ID.
   *
   * @return \Drupal\forms_steps\ProgressStepInterface
   *   The forms_steps progress step.
   *
   * @throws \InvalidArgumentException
   *   Thrown if $progress_step_id does not exist.
   */
  public function getProgressStep($progress_step_id);

  /**
   * Sets a step's label.
   *
   * @param string $step_id
   *   The step ID to set the label for.
   * @param string $label
   *   The step's label.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepLabel($step_id, $label);

  /**
   * Sets a progress step's label.
   *
   * @param string $progress_step_id
   *   The progress step ID to set the label for.
   * @param string $label
   *   The progress step's label.
   *
   * @return \Drupal\forms_steps\ProgressStepInterface
   *   The forms_steps entity.
   */
  public function setProgressStepLabel($progress_step_id, $label);

  /**
   * Sets a step's weight value.
   *
   * @param string $step_id
   *   The step ID to set the weight for.
   * @param int $weight
   *   The step's weight.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepWeight($step_id, $weight);

  /**
   * Sets a step's Entity bundle.
   *
   * @param string $step_id
   *   The step ID to set the entity_bundle for.
   * @param int $entityBundle
   *   The step's entity bundle.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepEntityBundle($step_id, $entityBundle);

  /**
   * Sets a step's Entity type.
   *
   * @param string $step_id
   *   The step ID to set the entity_bundle for.
   * @param int $entity_type
   *   The step's entity type.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepEntityType($step_id, $entity_type);

  /**
   * Sets a step's form mode value.
   *
   * @param string $step_id
   *   The step ID to set the form mode for.
   * @param int $formMode
   *   The step's form mode.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepFormMode($step_id, $formMode);

  /**
   * Sets a step's URL value.
   *
   * @param string $step_id
   *   The step ID to set the URL for.
   * @param int $url
   *   The step's URL.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepUrl($step_id, $url);

  /**
   * Sets a step's submit label.
   *
   * @param string $step_id
   *   The step ID to set the submit label for.
   * @param string $label
   *   The step's submit label.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepSubmitLabel($step_id, $label);

  /**
   * Sets a step's cancel label.
   *
   * @param string $step_id
   *   The step ID to set the cancel label for.
   * @param string $label
   *   The step's cancel label.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepCancelLabel($step_id, $label);

  /**
   * Sets a step's cancel route.
   *
   * @param string $step_id
   *   The step ID to set the route for.
   * @param string $route
   *   The step's cancel route.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepCancelRoute($step_id, $route);

  /**
   * Sets a step's cancel step.
   *
   * @param string $step_id
   *   The step ID to set the cancel step for.
   * @param \Drupal\forms_steps\Step $step
   *   The step's cancel step.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepCancelStep($step_id, Step $step);

  /**
   * Sets a step's cancel step mode.
   *
   * @param string $step_id
   *   The step ID to set the cancel step mode for.
   * @param string $mode
   *   The step's cancel step mode.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   */
  public function setStepCancelStepMode($step_id, $mode);

  /**
   * Sets the progress step's active routes.
   *
   * @param string $progress_step_id
   *   The progress step ID to set the active routes for.
   * @param array $routes
   *   The progress step's active routes.
   *
   * @return \Drupal\forms_steps\ProgressStepInterface
   *   The forms_steps entity.
   */
  public function setProgressStepActiveRoutes($progress_step_id, array $routes);

  /**
   * Sets a progress step's link.
   *
   * @param string $progress_step_id
   *   The progress step ID to set the link for.
   * @param string $link
   *   The progress step's link.
   *
   * @return \Drupal\forms_steps\ProgressStepInterface
   *   The forms_steps entity.
   */
  public function setProgressStepLink($progress_step_id, $link);

  /**
   * Sets a progress step's link visibility.
   *
   * @param string $progress_step_id
   *   The progress step ID to set the link for.
   * @param array $steps
   *   The progress step's link visibility.
   *
   * @return \Drupal\forms_steps\ProgressStepInterface
   *   The forms_steps entity.
   */
  public function setProgressStepLinkVisibility($progress_step_id, array $steps);

  /**
   * Deletes a step from the forms_steps.
   *
   * @param string $step_id
   *   The step ID to delete.
   *
   * @return \Drupal\forms_steps\StepInterface
   *   The forms_steps entity.
   *
   * @throws \InvalidArgumentException
   *   Thrown if $step_id does not exist.
   */
  public function deleteStep($step_id);

  /**
   * Deletes a progress step from the forms_steps.
   *
   * @param string $progress_step_id
   *   The progress step ID to delete.
   *
   * @return \Drupal\forms_steps\ProgressStepInterface
   *   The forms_steps entity.
   *
   * @throws \InvalidArgumentException
   *   Thrown if $progress_step_id does not exist.
   */
  public function deleteProgressStep($progress_step_id);

  /**
   * Returns the next step to $step.
   *
   * @param \Drupal\forms_steps\Step $step
   *   The current Step.
   *
   * @return \Drupal\forms_steps\Step|null
   *   Returns the next Step or null if no next step found.
   */
  public function getNextStep(Step $step);

  /**
   * Returns the previous step to $step.
   *
   * @param \Drupal\forms_steps\Step $step
   *   The current Step.
   *
   * @return \Drupal\forms_steps\Step|null
   *   Returns the previous Step or first step if no previous step found.
   */
  public function getPreviousStep(Step $step);

  /**
   * Set the label of the delete button of the step.
   *
   * @param int $step_id
   *   Step id.
   * @param mixed $label
   *   Label to set.
   *
   * @return \Drupal\forms_steps\Entity\FormsSteps
   *   The forms steps.
   */
  public function setStepDeleteLabel($step_id, $label);

  /**
   * Set the delete state (hidden or shown) of the step.
   *
   * @param int $step_id
   *   Step id.
   * @param bool $state
   *   State to set.
   *
   * @return \Drupal\forms_steps\Entity\FormsSteps
   *   The forms steps.
   */
  public function setStepDeleteState($step_id, $state);

  /**
   * Set the label of the previous button of the step.
   *
   * @param int $step_id
   *   Step id.
   * @param mixed $label
   *   Label to set.
   *
   * @return \Drupal\forms_steps\Entity\FormsSteps
   *   The forms steps.
   */
  public function setStepPreviousLabel($step_id, $label);

  /**
   * Set the previous state (hidden or displayed) of the step.
   *
   * @param int $step_id
   *   Step id.
   * @param bool $state
   *   State to set.
   *
   * @return \Drupal\forms_steps\Entity\FormsSteps
   *   The forms steps.
   */
  public function setStepPreviousState($step_id, $state);

}

Members

Namesort descending Modifiers Type Description Overrides
AccessibleInterface::access public function Checks data value access. 9
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 34
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 34
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 27
ConfigEntityInterface::calculateDependencies public function Calculates dependencies and stores them in the dependency property. 2
ConfigEntityInterface::disable public function Disables the configuration entity. 2
ConfigEntityInterface::enable public function Enables the configuration entity. 2
ConfigEntityInterface::get public function Returns the value of a property. 2
ConfigEntityInterface::getDependencies public function Gets the configuration dependencies. 2
ConfigEntityInterface::hasTrustedData public function Gets whether on not the data is trusted. 2
ConfigEntityInterface::isInstallable public function Checks whether this entity is installable. 2
ConfigEntityInterface::isUninstalling public function Returns whether this entity is being changed during the uninstall process. 2
ConfigEntityInterface::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. 2
ConfigEntityInterface::set public function Sets the value of a property. 2
ConfigEntityInterface::setStatus public function Sets the status of the configuration entity. 2
ConfigEntityInterface::status public function Returns whether the configuration entity is enabled. 2
ConfigEntityInterface::trustData public function Sets that the data should be trusted. 2
EntityInterface::bundle public function Gets the bundle of the entity. 2
EntityInterface::create public static function Constructs a new entity object, without permanently saving it. 2
EntityInterface::createDuplicate public function Creates a duplicate of the entity. 2
EntityInterface::delete public function Deletes an entity permanently. 2
EntityInterface::enforceIsNew public function Enforces an entity to be new. 2
EntityInterface::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. 2
EntityInterface::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. 2
EntityInterface::getConfigDependencyName public function Gets the configuration dependency name. 2
EntityInterface::getConfigTarget public function Gets the configuration target identifier for the entity. 2
EntityInterface::getEntityType public function Gets the entity type definition. 2
EntityInterface::getEntityTypeId public function Gets the ID of the type of the entity. 2
EntityInterface::getOriginalId public function Gets the original ID. 2
EntityInterface::getTypedData public function Gets a typed data object for this entity object. 2
EntityInterface::hasLinkTemplate public function Indicates if a link template exists for a given key. 2
EntityInterface::id public function Gets the identifier. 2
EntityInterface::isNew public function Determines whether the entity is new. 2
EntityInterface::label public function Gets the label of the entity. 2
EntityInterface::language public function Gets the language of the entity. 2
EntityInterface::link Deprecated public function Deprecated way of generating a link to the entity. See toLink(). 2
EntityInterface::load public static function Loads an entity. 2
EntityInterface::loadMultiple public static function Loads one or more entities. 2
EntityInterface::postCreate public function Acts on a created entity before hooks are invoked. 2
EntityInterface::postDelete public static function Acts on deleted entities before the delete hook is invoked. 2
EntityInterface::postLoad public static function Acts on loaded entities. 3
EntityInterface::postSave public function Acts on a saved entity before the insert or update hook is invoked. 2
EntityInterface::preCreate public static function Changes the values of an entity before it is created. 2
EntityInterface::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. 2
EntityInterface::preSave public function Acts on an entity before the presave hook is invoked. 2
EntityInterface::referencedEntities public function Gets a list of entities referenced by this entity. 2
EntityInterface::save public function Saves an entity permanently. 2
EntityInterface::setOriginalId public function Sets the original ID. 2
EntityInterface::toArray public function Gets an array of all property values. 3
EntityInterface::toLink public function Generates the HTML for a link to this entity. 2
EntityInterface::toUrl public function Gets the URL object for the entity. 2
EntityInterface::uriRelationships public function Gets a list of URI relationships supported by this entity. 2
EntityInterface::url Deprecated public function Gets the public URL for this entity. 2
EntityInterface::urlInfo Deprecated public function Gets the URL object for the entity. 2
EntityInterface::uuid public function Gets the entity UUID (Universally Unique Identifier). 2
FormsStepsInterface::addProgressStep public function Adds a progress step to the forms_steps. 1
FormsStepsInterface::addStep public function Adds a step to the forms_steps. 1
FormsStepsInterface::deleteProgressStep public function Deletes a progress step from the forms_steps. 1
FormsStepsInterface::deleteStep public function Deletes a step from the forms_steps. 1
FormsStepsInterface::getFirstStep public function Retrieve the first step defined on a forms steps entity. 1
FormsStepsInterface::getLastStep public function Retrieve the last step defined on a forms steps entity. 1
FormsStepsInterface::getNextStep public function Returns the next step to $step. 1
FormsStepsInterface::getNextStepRoute public function Returns the next step route. 1
FormsStepsInterface::getPreviousStep public function Returns the previous step to $step. 1
FormsStepsInterface::getProgressStep public function Gets a forms_steps progress step. 1
FormsStepsInterface::getProgressSteps public function Gets progress step objects for the provided progress step IDs. 1
FormsStepsInterface::getStep public function Gets a forms_steps step. 1
FormsStepsInterface::getStepRoute public function Returns the current step route. 1
FormsStepsInterface::getSteps public function Gets step objects for the provided step IDs. 1
FormsStepsInterface::hasProgressStep public function Determines if the forms_steps has a progress step with the provided ID. 1
FormsStepsInterface::hasStep public function Determines if the forms_steps has a step with the provided ID. 1
FormsStepsInterface::setProgressStepActiveRoutes public function Sets the progress step's active routes. 1
FormsStepsInterface::setProgressStepLabel public function Sets a progress step's label. 1
FormsStepsInterface::setProgressStepLink public function Sets a progress step's link. 1
FormsStepsInterface::setProgressStepLinkVisibility public function Sets a progress step's link visibility. 1
FormsStepsInterface::setStepCancelLabel public function Sets a step's cancel label. 1
FormsStepsInterface::setStepCancelRoute public function Sets a step's cancel route. 1
FormsStepsInterface::setStepCancelStep public function Sets a step's cancel step. 1
FormsStepsInterface::setStepCancelStepMode public function Sets a step's cancel step mode. 1
FormsStepsInterface::setStepDeleteLabel public function Set the label of the delete button of the step. 1
FormsStepsInterface::setStepDeleteState public function Set the delete state (hidden or shown) of the step. 1
FormsStepsInterface::setStepEntityBundle public function Sets a step's Entity bundle. 1
FormsStepsInterface::setStepEntityType public function Sets a step's Entity type. 1
FormsStepsInterface::setStepFormMode public function Sets a step's form mode value. 1
FormsStepsInterface::setStepLabel public function Sets a step's label. 1
FormsStepsInterface::setStepPreviousLabel public function Set the label of the previous button of the step. 1
FormsStepsInterface::setStepPreviousState public function Set the previous state (hidden or displayed) of the step. 1
FormsStepsInterface::setStepSubmitLabel public function Sets a step's submit label. 1
FormsStepsInterface::setStepUrl public function Sets a step's URL value. 1
FormsStepsInterface::setStepWeight public function Sets a step's weight value. 1
RefinableCacheableDependencyInterface::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. 1
RefinableCacheableDependencyInterface::addCacheContexts public function Adds cache contexts. 1
RefinableCacheableDependencyInterface::addCacheTags public function Adds cache tags. 1
RefinableCacheableDependencyInterface::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. 1
SynchronizableInterface::isSyncing public function Returns whether this entity is being changed as part of a synchronization. 1
SynchronizableInterface::setSyncing public function Sets the status of the synchronization flag. 1
ThirdPartySettingsInterface::getThirdPartyProviders public function Gets the list of third parties that store information. 5
ThirdPartySettingsInterface::getThirdPartySetting public function Gets the value of a third-party setting. 5
ThirdPartySettingsInterface::getThirdPartySettings public function Gets all third-party settings of a given module. 5
ThirdPartySettingsInterface::setThirdPartySetting public function Sets the value of a third-party setting. 5
ThirdPartySettingsInterface::unsetThirdPartySetting public function Unsets a third-party setting. 5