public function readAction()
    {
        $result = parent::readAction();
        if (!is_array($result)) {
            return $result;
        }

        $em = $this->getEntityManager();
        $status = $this->getFieldsConfig()->getConfigItem('status');
        $statuses = $status['dataSource']->getData();

        $entity = $em->find($this->entityName, Application::getRequest()->get('id'));
        $status = $entity->getStatus();

        return array_merge($result, ['status' => isset($statuses[$status]) ? $statuses[$status] : '']);
    }
public function readAction()
    {
        $result = parent::readAction();
        if (!is_array($result)) {
            return $result;
        }

        $em = $this->getEntityManager();
        $status = $this->getFieldsConfig()->getConfigItem('status');
        $statuses = $status['dataSource']->getData();

        $entity = $em->find($this->entityName, Application::getRequest()->get('id'));
        $status = $entity->getStatus();

        return array_merge($result, ['status' => isset($statuses[$status]) ? $statuses[$status] : '']);
    }
public function readAction ( ) { $ result = parent :: readAction ( ) ; if ( ! is_array ( $ result ) ) { return $ result ; } $ em = $ this -> getEntityManager ( ) ; $ status = $ this -> getFieldsConfig ( ) -> getConfigItem ( 'status' ) ; $ statuses = $ status [ 'dataSource' ] -> getData ( ) ; $ entity = $ em -> find ( $ this -> entityName , Application :: getRequest ( ) -> get ( 'id' ) ) ; $ status = $ entity -> getStatus ( ) ; return array_merge ( $ result , [ 'status' => isset ( $ statuses [ $ status ] ) ? $ statuses [ $ status ] : '' ] ) ; }
View user page

@return array|Forward
View user page