public function findByTimetableAndDomId($timetableId, $domId)
    {
        $block = $this->findOneBy(
            array(
                'timetable' => $timetableId,
                'domId' => $domId,
            )
        );
        // no block found so create first a non persistent block
        if (empty($block)) {
            $block = new Block();
            $block->setDomId($domId);
            $timetable = $this->getEntityManager()->getRepository('CanalTPMttBundle:Timetable')->find(
                $timetableId
            );
            $block->setTimetable($timetable);
        }

        return $block;
    }
public function findByTimetableAndDomId($timetableId, $domId)
    {
        $block = $this->findOneBy(
            array(
                'timetable' => $timetableId,
                'domId' => $domId,
            )
        );
        // no block found so create first a non persistent block
        if (empty($block)) {
            $block = new Block();
            $block->setDomId($domId);
            $timetable = $this->getEntityManager()->getRepository('CanalTPMttBundle:Timetable')->find(
                $timetableId
            );
            $block->setTimetable($timetable);
        }

        return $block;
    }
public function findByTimetableAndDomId ( $ timetableId , $ domId ) { $ block = $ this -> findOneBy ( array ( 'timetable' => $ timetableId , 'domId' => $ domId , ) ) ; // no block found so create first a non persistent block if ( empty ( $ block ) ) { $ block = new Block ( ) ; $ block -> setDomId ( $ domId ) ; $ timetable = $ this -> getEntityManager ( ) -> getRepository ( 'CanalTPMttBundle:Timetable' ) -> find ( $ timetableId ) ; $ block -> setTimetable ( $ timetable ) ; } return $ block ; }
find a block by Route Id And DomId

@param  string $lineId Line Id in meth db
@param  string $domId  Dom Id in layout
@return Block  Entity or null
find a block by Route Id And DomId