Flickr::populateItemTemplate PHP 메소드

populateItemTemplate() 공개 메소드

Return an array of key->value using the item data
public populateItemTemplate ( &$item ) : array
리턴 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

예제 #1
0
파일: Flickr.php 프로젝트: remiprev/pubwich
 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;
 }