public function findAllWithAspect($aspectName, $restrictSiteSlug = null)
    {
//        if (!$this->AspectService->getBySlug($aspectName))
//            throw new Exception('Cannot find Elements with Aspect ['.$aspectName.'], Aspect does not exist');

        $dto = new DTO();

        $dto->setParameter("IncludesAspect", ltrim($aspectName, '@'));
        if(!is_null($restrictSiteSlug))
            $dto->setParameter("AnchoredSiteSlug", $restrictSiteSlug);

        $dto = $this->findAll($dto);

        return $dto->getResults();
    }
public function findAllWithAspect($aspectName, $restrictSiteSlug = null)
    {
//        if (!$this->AspectService->getBySlug($aspectName))
//            throw new Exception('Cannot find Elements with Aspect ['.$aspectName.'], Aspect does not exist');

        $dto = new DTO();

        $dto->setParameter("IncludesAspect", ltrim($aspectName, '@'));
        if(!is_null($restrictSiteSlug))
            $dto->setParameter("AnchoredSiteSlug", $restrictSiteSlug);

        $dto = $this->findAll($dto);

        return $dto->getResults();
    }
public function findAllWithAspect ( $ aspectName , $ restrictSiteSlug = null ) { //        if (!$this->AspectService->getBySlug($aspectName)) //            throw new Exception('Cannot find Elements with Aspect ['.$aspectName.'], Aspect does not exist'); $ dto = new DTO ( ) ; $ dto -> setParameter ( "IncludesAspect" , ltrim ( $ aspectName , '@' ) ) ; if ( ! is_null ( $ restrictSiteSlug ) ) $ dto -> setParameter ( "AnchoredSiteSlug" , $ restrictSiteSlug ) ; $ dto = $ this -> findAll ( $ dto ) ; return $ dto -> getResults ( ) ; }
Returns all elements that have the specified aspect

@param string $aspectName The name of the desired aspect

@return array An array of the results
Returns all elements that have the specified aspect