src/Sulu/Bundle/SecurityBundle/Controller/RoleController.php
private function setSecurityType($role, $securityTypeData)
    {
        $securityType = $this->getDoctrine()
            ->getRepository('SuluSecurityBundle:SecurityType')
            ->findSecurityTypeById($securityTypeData['id']);

        if (!$securityType) {
            throw new EntityNotFoundException('SuluSecurityBundle:SecurityType', $securityTypeData['id']);
        }
        $role->setSecurityType($securityType);
    }
private function setSecurityType($role, $securityTypeData)
    {
        $securityType = $this->getDoctrine()
            ->getRepository('SuluSecurityBundle:SecurityType')
            ->findSecurityTypeById($securityTypeData['id']);

        if (!$securityType) {
            throw new EntityNotFoundException('SuluSecurityBundle:SecurityType', $securityTypeData['id']);
        }
        $role->setSecurityType($securityType);
    }
private function setSecurityType ( $ role , $ securityTypeData ) { $ securityType = $ this -> getDoctrine ( ) -> getRepository ( 'SuluSecurityBundle:SecurityType' ) -> findSecurityTypeById ( $ securityTypeData [ 'id' ] ) ; if ( ! $ securityType ) { throw new EntityNotFoundException ( 'SuluSecurityBundle:SecurityType' , $ securityTypeData [ 'id' ] ) ; } $ role -> setSecurityType ( $ securityType ) ; }
Sets the securityType from the given data to the role.

@param RoleInterface $role
@param $securityTypeData

@throws \Sulu\Component\Rest\Exception\EntityNotFoundException
Sets the securityType from the given data to the role .