Pimcore\Model\Element\WorkflowState::setCid PHP Method

setCid() public method

public setCid ( integer $cid )
$cid integer
    public function setCid($cid)
    {
        $this->cid = $cid;
    }

Usage Example

Example #1
0
 /**
  * @return null|WorkflowState
  */
 public function getWorkflowStateForElement()
 {
     $elementType = Service::getElementType($this->element);
     $workflowState = WorkflowState::getByPrimary($this->element->getId(), $elementType, $this->workflow->getId());
     if (empty($workflowState)) {
         $workflowState = new WorkflowState();
         $workflowState->setCid($this->element->getId());
         $workflowState->setCtype($elementType);
         $workflowState->setWorkflowId($this->workflow->getId());
     }
     return $workflowState;
 }