public function getList($all = false) { $this->data = OstoolbarCache::callback($this, '_fetchList', array(), null, true); $params = JComponentHelper::getParams('com_ostoolbar'); $selected = array(); if (!$all && $params->get("videos")) { $selected = preg_split("/,/", $params->get("videos")); } if (count($selected)) { $data = array(); foreach ($selected as $item) { foreach ($this->data as $row) { if ("s_" . $row->id == $item) { $data[] = $row; break; } } } $this->data = $data; } return $this->data; }
public function getData() { $id = $this->getState('id', 0); $this->data = OstoolbarCache::callback($this, '_fetchData', array($id)); return $this->data; }