getQuery(true) ->select('COUNT(id) AS count_links') ->from('#__weblinks') ->where('state = 1'); $links = $db->setQuery($query)->loadResult(); if (!$links) { return array(); } return array(array( 'title' => JText::sprintf('PLG_SYSTEM_WEBLINKS_STATISTICS'), 'icon' => 'out-2', 'data' => $links, 'link' => JRoute::_('index.php?option=com_weblinks&view=weblinks&filter[published]=1'), )); } }