Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php
public function findByEntityClassname($classname)
    {
        //get all the business entities
        $businessEntities = $this->getBusinessEntities();

        //the result
        $businessEntity = null;

        //parse the business entities
        foreach ($businessEntities as $tempBusinessEntity) {
            //look for the same id
            if ($tempBusinessEntity->getClass() === $classname) {
                $businessEntity = $tempBusinessEntity;
                //business entity was found, there is no need to continue
                continue;
            }
        }

        return $businessEntity;
    }
public function findByEntityClassname($classname)
    {
        //get all the business entities
        $businessEntities = $this->getBusinessEntities();

        //the result
        $businessEntity = null;

        //parse the business entities
        foreach ($businessEntities as $tempBusinessEntity) {
            //look for the same id
            if ($tempBusinessEntity->getClass() === $classname) {
                $businessEntity = $tempBusinessEntity;
                //business entity was found, there is no need to continue
                continue;
            }
        }

        return $businessEntity;
    }
public function findByEntityClassname ( $ classname ) { //get all the business entities $ businessEntities = $ this -> getBusinessEntities ( ) ; //the result $ businessEntity = null ; //parse the business entities foreach ( $ businessEntities as $ tempBusinessEntity ) { //look for the same id if ( $ tempBusinessEntity -> getClass ( ) === $ classname ) { $ businessEntity = $ tempBusinessEntity ; //business entity was found, there is no need to continue continue ; } } return $ businessEntity ; }
Get a business entity by classname.

@param string $classname

@return BusinessEntity
Get a business entity by classname .