/** * Fetch a list of posts rendered markups. * @param array $data The properties data array * @return array Array of parsed markup items for each post in the list. */ public static function get_posts_markup($data) { $posts = Upfront_Posts_Model::get_posts($data); $posts_markup = array(); $view = new Upfront_Posts_PostView($data); foreach ($posts as $idx => $post) { $posts_markup[$idx] = $view->get_markup($post); } return $posts_markup; }