Добавлена совместимость с Joomla 4 / Joomla 5 и актуальной версией Zoo 4.1.45 на PHP 8.1.
$query->where('type = hotel', 'OR');$query->where('type = restoran', 'OR');$query->where('type = company');
$query->where('type = "hotel"', 'OR');$query->where('type ="restoran"', 'OR');$query->where('type = "company"');
/** * Get items from ZOO module params. * * @param AppData $params Module Parameter * @return array Items */ public function getItems($params) { $items = array(); if ($application = $this->app->table->application->get($params->get('application', 0))) { // set one or multiple categories $category = (int) $params->get('category', 0); if ($params->get('subcategories')) { $categories = $application->getCategoryTree(true); if (isset($categories[$category])) { $category = array_merge(array($category), array_keys($categories[$category]->getChildren(true))); } } // get items if ($params->get('mode') == 'item') { if (($item = $this->app->table->item->get($params->get('item_id'))) && $item->isPublished() && $item->canAccess()) { $items[] = $item; } } else if ($params->get('mode') == 'types') { $items = $this->app->table->item->getByType($params->get('type'), $application->id, true, null, $params->get('order', array('_itemname')), 0, $params->get('count', 4)); } else { $items = $this->app->table->item->getByCategory($application->id, $category, true, null, $params->get('order', array('_itemname')), 0, $params->get('count', 4)); } } return $items; }