private function get_list_or_item($data, $field, $i = null, $default = '')
    {
        $i = ($i === false || count($this->article_ids) > 1 ) ? $i : 0;

        if ($i === null || $i === false) {
            $result = [];
            foreach ($data as $page_id => $item) {
                $result[$page_id] = isset($item[$field]) ? $item[$field] : $default;
            }
            return $result;
        }

        return isset($data[$this->article_ids[$i]][$field]) ? $data[$this->article_ids[$i]][$field] : $default;
    }
private function get_list_or_item($data, $field, $i = null, $default = '')
    {
        $i = ($i === false || count($this->article_ids) > 1 ) ? $i : 0;

        if ($i === null || $i === false) {
            $result = [];
            foreach ($data as $page_id => $item) {
                $result[$page_id] = isset($item[$field]) ? $item[$field] : $default;
            }
            return $result;
        }

        return isset($data[$this->article_ids[$i]][$field]) ? $data[$this->article_ids[$i]][$field] : $default;
    }
private function get_list_or_item ( $ data , $ field , $ i = null , $ default = '' ) { $ i = ( $ i === false || count ( $ this -> article_ids ) > 1 ) ? $ i : 0 ; if ( $ i === null || $ i === false ) { $ result = [ ] ; foreach ( $ data as $ page_id => $ item ) { $ result [ $ page_id ] = isset ( $ item [ $ field ] ) ? $ item [ $ field ] : $ default ; } return $ result ; } return isset ( $ data [ $ this -> article_ids [ $ i ] ] [ $ field ] ) ? $ data [ $ this -> article_ids [ $ i ] ] [ $ field ] : $ default ; }
Get list of articles or items
@param  array $data
@param  string $field
@param  integer $i
@param  string $default
@return mixed
Get list of articles or items