2014-10-08 34 views
0

我想通过一个自定义日期字段获得由特定标签和秩序过滤的项目(EXTERN ID是“日期”)获取项目由特定的标签和自定义字段进行过滤

我已经根据文档尝试多种方式,比如PodioItem :: Filter()和标签数组以及一个简单的字符串,但是我没有得到预期的结果。

我知道我们可以通过标签进行过滤,并按特定字段ID排序,但我不知道如何去做。从文档

释:

tags: Filter by the tags on the item 
{field_id}: The id of the field to sort by, which can be fields of type "state", "text", "location", "money", "number", "calculation", "progress", "duration", "app", "date", "contact", "category" and "question". 

有谁知道怎么做呢?

谢谢大家!

回答

0

在这个页面的最底部http://podio.github.io/podio-php/items/你可以看到如何做日期过滤器。您可以将它与标签结合起来,如下所示:

$items = PodioItem::filter($app_id, array(
    'filters' => array(
    $external_id_of_date_field => array(
     "from" => "2014-01-01 00:00:00", 
     "to" => "2014-07-31 23:59:59" 
    ), 
    'tags' => array('tag1') 
), 
)); 
相关问题