Flickr::populateItemTemplate PHP Method

populateItemTemplate() public method

Return an array of key->value using the item data
public populateItemTemplate ( &$item ) : array
return array
    public function populateItemTemplate(&$item)
    {
        $this->compteur++;
        $path = $item['pathalias'] != '' ? $item['pathalias'] : $item['owner'];
        return array('link' => 'http://www.flickr.com/photos/' . $path . '/' . $item['id'] . '/', 'title' => htmlspecialchars($item['title']), 'photo' => $this->getAbsoluteUrl($item), 'last_in_row' => $this->compteur % $this->row == 0);
    }

Usage Example

Ejemplo n.º 1
0
 public function populateItemTemplate(&$item)
 {
     $path = $item['pathalias'] != '' ? $item['pathalias'] : $item['owner'];
     $original = parent::populateItemTemplate($item);
     $original['link'] = 'http://www.flickr.com/photos/' . $path . '/' . $item['id'] . '/in/pool-' . $this->groupname . '/';
     return $original;
 }