You are here

class ProgressStep in Forms Steps 8

A value object representing a progress step.

Hierarchy

Expanded class hierarchy of ProgressStep

1 file declares its use of ProgressStep
FormsSteps.php in src/Entity/FormsSteps.php

File

src/ProgressStep.php, line 8

Namespace

Drupal\forms_steps
View source
class ProgressStep implements ProgressStepInterface {

  /**
   * The forms_steps the progress step is attached to.
   *
   * @var \Drupal\forms_steps\FormsStepsInterface
   */
  protected $formsSteps;

  /**
   * The progress step's ID.
   *
   * @var string
   */
  protected $id;

  /**
   * The progress step's label.
   *
   * @var string
   */
  protected $label;

  /**
   * The progress step's weight.
   *
   * @var int
   */
  protected $weight;

  /**
   * The progress step's active routes.
   *
   * @var string
   */
  protected $routes;

  /**
   * The progress step's link.
   *
   * @var string
   */
  protected $link;

  /**
   * The progress step's link visibility.
   *
   * @var array
   */
  protected $linkVisibility;

  /**
   * Step constructor.
   *
   * @param \Drupal\forms_Steps\FormsStepsInterface $forms_steps
   *   The forms_steps the progress step is attached to.
   * @param string $id
   *   The progress step's ID.
   * @param string $label
   *   The progress step's label.
   * @param int $weight
   *   The progress step's weight.
   * @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.
   */
  public function __construct(FormsStepsInterface $forms_steps, $id, $label, $weight, array $routes, $link, array $link_visibility) {
    $this->formsSteps = $forms_steps;
    $this->id = $id;
    $this->label = $label;
    $this->weight = $weight;
    $this->routes = $routes;
    $this->link = $link;
    $this->linkVisibility = $link_visibility;
  }

  /**
   * {@inheritdoc}
   */
  public function id() {
    return $this->id;
  }

  /**
   * {@inheritdoc}
   */
  public function label() {
    return $this->label;
  }

  /**
   * {@inheritdoc}
   */
  public function weight() {
    return $this->weight;
  }

  /**
   * {@inheritdoc}
   */
  public function activeRoutes() {
    return $this->routes;
  }

  /**
   * {@inheritdoc}
   */
  public function setActiveRoutes(array $routes) {
    return $this->routes = $routes;
  }

  /**
   * {@inheritdoc}
   */
  public function link() {
    return $this->link;
  }

  /**
   * {@inheritdoc}
   */
  public function setLink($link) {
    return $this->link = $link;
  }

  /**
   * {@inheritdoc}
   */
  public function linkVisibility() {
    return $this->linkVisibility;
  }

  /**
   * {@inheritdoc}
   */
  public function setLinkVisibility(array $steps) {
    return $this->linkVisibility = $steps;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ProgressStep::$formsSteps protected property The forms_steps the progress step is attached to.
ProgressStep::$id protected property The progress step's ID.
ProgressStep::$label protected property The progress step's label.
ProgressStep::$link protected property The progress step's link.
ProgressStep::$linkVisibility protected property The progress step's link visibility.
ProgressStep::$routes protected property The progress step's active routes.
ProgressStep::$weight protected property The progress step's weight.
ProgressStep::activeRoutes public function Gets the active routes for this progress step. Overrides ProgressStepInterface::activeRoutes
ProgressStep::id public function Gets the progress step's ID. Overrides ProgressStepInterface::id
ProgressStep::label public function Gets the progress step's label. Overrides ProgressStepInterface::label
ProgressStep::link public function Gets the link for this progress step. Overrides ProgressStepInterface::link
ProgressStep::linkVisibility public function Gets the link visibility for this progress step. Overrides ProgressStepInterface::linkVisibility
ProgressStep::setActiveRoutes public function Set the active routes for this progress step. Overrides ProgressStepInterface::setActiveRoutes
ProgressStep::setLink public function Set the link for this progress step. Overrides ProgressStepInterface::setLink
ProgressStep::setLinkVisibility public function Set the link visibility for this progress step. Overrides ProgressStepInterface::setLinkVisibility
ProgressStep::weight public function Gets the progress step's weight. Overrides ProgressStepInterface::weight
ProgressStep::__construct public function Step constructor.