Source for file contact.php
Documentation is available at contact.php
* @package Joomla.Administrator
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package Joomla.Administrator
* @subpackage com_contact
* Get the associated language flags
* @param int $contactid The item id to search associations
* @return string The language HTML
foreach ($associations as $tag =>
$associated)
$associations[$tag] = (int)
$associated->id;
// Get the associated contact items
$query =
$db->getQuery(true)
->select('c.id, c.name as title')
->select('l.sef as lang_sef')
->from('#__contact_details as c')
->select('cat.title as category_title')
->join('LEFT', '#__categories as cat ON cat.id=c.catid')
->join('LEFT', '#__languages as l ON c.language=l.lang_code')
->select('l.title as language_title');
$items =
$db->loadObjectList('id');
catch
(runtimeException $e)
throw
new Exception($e->getMessage(), 500);
foreach ($items as &$item)
$url =
JRoute::_('index.php?option=com_contact&task=contact.edit&id=' . (int)
$item->id);
JHtml::_('image', 'mod_languages/' .
$item->image .
'.gif',
array('title' =>
$item->language_title),
'(' .
$item->category_title .
')'
$item->link =
JHtml::_('tooltip', implode(' ', $tooltipParts), null, null, $text, $url, null, 'hasTooltip label label-association label-' .
$item->lang_sef);
* @param int $value The featured value
* @param bool $canChange Whether the value can be changed or not
* @return string The anchor tag to toggle featured/unfeatured contacts.
public static function featured($value =
0, $i, $canChange =
true)
// Array of image, task, title, action
0 =>
array('disabled.png', 'contacts.featured', 'COM_CONTACT_UNFEATURED', 'COM_CONTACT_TOGGLE_TO_FEATURE'),
1 =>
array('featured.png', 'contacts.unfeatured', 'JFEATURED', 'COM_CONTACT_TOGGLE_TO_UNFEATURE'),
$html =
JHtml::_('image', 'admin/'.
$state[0], JText::_($state[2]), null, true);
$html =
'<a href="#" onclick="return listItemTask(\'cb'.
$i.
'\',\''.
$state[1].
'\')" title="'.
JText::_($state[3]).
'">'
Documentation generated on Tue, 19 Nov 2013 14:56:34 +0100 by phpDocumentor 1.4.3