2017-12-01 4 views
0

객체의 모든 태그를 배열로 침출 할 수있는 메서드 또는 사용자 정의 메서드가 내장되어 있습니까?pimcore 객체의 모든 태그를 반환합니다.

$this->session = new \Zend_Session_Namespace("webUser"); 
    $webUser = \Pimcore\Model\Object\WebUser::getById($this->session->webUser); 
    $tags = \Pimcore\Model\Element\Tag::getTagsForElement("object", $this->session->webUser); 
    $this->view->tags = $tags; 
    var_dump($tags); 

현재 사용자가 세션 사용자 등을 무시하지만이 코드는 개체에 할당 된 태그를 덤프합니다. 태그가 지정되지 않아도 모든 태그를 뱉어 낼 필요가 있습니다. 어떤 아이디어?

답변

0

이 시도 :

$db = Db::get(); 
$select = $db->select() 
    ->from('tags_assignment', []) 
    ->where('tags_assignment.ctype = ?', 'object'); 
$res = $db->query($select)->fetchAll();