PHP를 사용하여 콘텐츠를 가져 오려고합니다. 하지만 내 코드가 작동하지 않는 것 같습니다. 나는 ezcontentobjecttreenode::subtree
기능을 사용하고 있지만,이 오류를 표시합니다eZ 게시 PHP로 콘텐츠 가져 오기
Using $this when not in object context in /home/quejadore/site/kernel/classes/ezcontentobjecttreenode.php on line 2032
가 여기 내 코드입니다.
$params = $nodes =& eZContentObjectTreeNode::subTree(array(
'Depth' => 3,
'SortBy' => array('published', false),
'Limit' => 3,
'ClassFilterType' => 'include',
'ClassFilterArray' => array('article_v3'),
'Attribute_filter' => array(array('article_v3/on_newsletter', '=',true))));
$nodes =& eZContentObjectTreeNode::subTree($params, 21312);
누구든지 도와 드릴 수 있습니까? ,
$params = array('Depth' => 3,
'Limit' =>1,
'IgnoreVisibility' => true,
'Limitation' => array(),
'ClassFilterType' => 'include',
'ClassFilterArray' => array('article_v3'),
'AttributeFilter' => array(array('article_v3/on_newsletter','=',true)));
$obj = new eZContentObjectTreeNode;
$nodes = $obj->subTree($params, 21312);
$dataMap =$nodes->attribute('data_map');
$image =& $dataMap['image']->content();
$list =& $image->aliasList();
var_dump($list['original']['url']);
에 당신은 정적 메소드를 호출하고, 그것은 정적 방법이 아니다 ... 당신은 foo는 = 새로운 EzWhatever을 eztree 객체를 인스턴스화하고 $ 방법이 제대로'호출 할 필요가; $ foo-> subtree (...)' –
고맙습니다. 고맙습니다. Marc. 작동하는 것 같습니다.하지만 배열은 NULL입니다. 그리고 매개 변수가 적어도 50 개의 객체를 만족시킬 것이라고 확신합니다 : | – You
'Attribute_filter'가 아닌'AttributeFilter'를 시도하십시오. – foobar