$gathering = $item->getGatheringObject(); $agp = new Permissions($gathering); if ($agp->canEditGatheringItems() && Loader::helper('validation/token')->validate('edit_gathering_item_template', $_REQUEST['token'])) { $reloadItemTile = false; if ($type->getGatheringItemTemplateTypeHandle() == 'tile') { $reloadItemTile = true; } if ($_POST['task'] == 'update_item_template') { $template = GatheringItemTemplate::getByID($_POST['gatID']); $item->setGatheringItemTemplate($type, $template); if ($reloadItemTile) { $item->render($type); } exit; } $assignments = GatheringItemFeatureAssignment::getList($item); $features = array(); foreach ($assignments as $as) { $f = $as->getFeatureObject(); if (is_object($f)) { $features[] = $f; } } $templates = GatheringItemTemplate::getListByType($type); ?> <script type="text/javascript"> $(function() { $('#ccm-dialog-gathering-item-templates .ccm-dialog-icon-item-grid-sets ul a').on('click', function() { $('#ccm-dialog-gathering-item-templates .ccm-overlay-icon-item-grid-list li').hide();
public function copyFeatureAssignment(FeatureAssignment $fa) { return GatheringItemFeatureAssignment::add($fa->getFeatureObject(), $fa->getFeatureDetailObject(), $this); }