protected function checkEmptyLoop($params)
    {
        $loopName = $this->getParam($params, 'rel');

        if (null == $loopName) {
            throw new \InvalidArgumentException(
                $this->translator->trans("Missing 'rel' parameter in ifloop/elseloop arguments")
            );
        }

        if (! isset($this->loopstack[$loopName])) {
            throw new \InvalidArgumentException(
                $this->translator->trans("Related loop name '%name'' is not defined.", ['%name' => $loopName])
            );
        }

        return $this->loopstack[$loopName]->isEmpty();
    }
protected function checkEmptyLoop($params)
    {
        $loopName = $this->getParam($params, 'rel');

        if (null == $loopName) {
            throw new \InvalidArgumentException(
                $this->translator->trans("Missing 'rel' parameter in ifloop/elseloop arguments")
            );
        }

        if (! isset($this->loopstack[$loopName])) {
            throw new \InvalidArgumentException(
                $this->translator->trans("Related loop name '%name'' is not defined.", ['%name' => $loopName])
            );
        }

        return $this->loopstack[$loopName]->isEmpty();
    }
protected function checkEmptyLoop ( $ params ) { $ loopName = $ this -> getParam ( $ params , 'rel' ) ; if ( null == $ loopName ) { throw new \ InvalidArgumentException ( $ this -> translator -> trans ( "Missing 'rel' parameter in ifloop/elseloop arguments" ) ) ; } if ( ! isset ( $ this -> loopstack [ $ loopName ] ) ) { throw new \ InvalidArgumentException ( $ this -> translator -> trans ( "Related loop name '%name'' is not defined." , [ '%name' => $ loopName ] ) ) ; } return $ this -> loopstack [ $ loopName ] -> isEmpty ( ) ; }
Check if a loop has returned results. The loop shoud have been executed before, or an
InvalidArgumentException is thrown

@param array $params

@return boolean                   true if the loop is empty
@throws \InvalidArgumentException
Check if a loop has returned results . The loop shoud have been executed before or an InvalidArgumentException is thrown