-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #166 fix: Cluster Filters on UCM list view
- Loading branch information
1 parent
eab22a3
commit 1b5fa4d
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* @package TJ-Fields | ||
* @author TechJoomla <[email protected]> | ||
* @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
// No direct access | ||
defined('_JEXEC') or die('Restricted access'); | ||
|
||
if (!key_exists('field', $displayData)) | ||
{ | ||
return; | ||
} | ||
|
||
$field = $displayData['field']; | ||
|
||
if ($field->value) | ||
{ | ||
JLoader::import("/components/com_cluster/includes/cluster", JPATH_ADMINISTRATOR); | ||
$clusterModel = ClusterFactory::model('Cluster', array('ignore_request' => true)); | ||
$cluster = $clusterModel->getItem($field->value); | ||
echo $cluster->name; | ||
} | ||
else | ||
{ | ||
echo "-"; | ||
} |