raoul2000\workflow\base\Status::getId PHP Method

getId() public method

Note that the status id returned must be unique inside the workflow it belongs to, but it doesn't have to be unique among all workflows.
public getId ( ) : string
return string the id for this status
    public function getId()
    {
        return $this->_id;
    }

Usage Example

 public function testStatusCreationSuccess()
 {
     $this->specify('create a status instance', function () {
         $s = new Status(['id' => 'draft', 'workflowId' => 'workflow1']);
         expect("status id is 'draft'", $s->getId())->equals('draft');
         expect("workflow id is 'workflow1'", $s->getWorkflowId())->equals('workflow1');
         expect("label is empty string", $s->getLabel())->equals('');
     });
     $this->specify('create a status instance with a label', function () {
         $s = new Status(['id' => 'draft', 'workflowId' => 'workflow1', 'label' => 'my custom label']);
         expect("label is 'my custom label'", $s->getLabel())->equals('my custom label');
     });
 }
All Usage Examples Of raoul2000\workflow\base\Status::getId