public function getWorkflowStatesForLayout(Layout $layout)
    {
        $states = array();
        foreach ($this->findBy(array('_layout' => null)) as $state) {
            $states[$state->getCode()] = $state;
        }

        foreach ($this->findBy(array('_layout' => $layout)) as $state) {
            $states[$state->getCode()] = $state;
        }

        ksort($states);

        return $states;
    }
public function getWorkflowStatesForLayout(Layout $layout)
    {
        $states = array();
        foreach ($this->findBy(array('_layout' => null)) as $state) {
            $states[$state->getCode()] = $state;
        }

        foreach ($this->findBy(array('_layout' => $layout)) as $state) {
            $states[$state->getCode()] = $state;
        }

        ksort($states);

        return $states;
    }
public function getWorkflowStatesForLayout ( Layout $ layout ) { $ states = array ( ) ; foreach ( $ this -> findBy ( array ( '_layout' => null ) ) as $ state ) { $ states [ $ state -> getCode ( ) ] = $ state ; } foreach ( $ this -> findBy ( array ( '_layout' => $ layout ) ) as $ state ) { $ states [ $ state -> getCode ( ) ] = $ state ; } ksort ( $ states ) ; return $ states ; }
Returns an array of available workflow states for the provided layout.

@param \BackBee\Site\Layout $layout

@return array
Returns an array of available workflow states for the provided layout .