function _createContent(&$toReturn) { $tpl =& new CopixTpl(); $capabilities = CopixProfileTools::getCapabilities(); //Assigning values to the template $tpl->assign('capabilities', $capabilities); //appel du template. $toReturn = $tpl->fetch('capability.kind.tpl'); return true; }
/** * gets the capabilities (the values) that can be applied to the given path * @param string $path the path we wants to get the capabilities for * @access public */ function getCapabilitiesForPath($path) { static $capabilities = false; if ($capabilities === false) { $capabilities = CopixProfileTools::getCapabilities(); } $toReturn = array(); foreach ($capabilities as $name => $capability) { if (CopixProfileTools::pathBelongsTo($path, $capability->name_ccpt)) { $toReturn[] = $capability; } } return $toReturn; }
/** * @param $this->params['group'] */ function _createContent(&$toReturn) { $tpl =& new CopixTpl(); $arTempCapabilities = CopixProfileTools::getCapabilities(); $arCapabilities = array(); //make array of current capability foreach ($this->params['group']->_capabilities as $path => $currentCapabilities) { foreach ($arTempCapabilities as $index => $capability) { if (isset($currentCapabilities[$capability->name_ccpb])) { $arCapabilities[$index] = $capability; } } } //assignation de la liste des profils connus. $tpl->assign('group', $this->params['group']); $tpl->assign('arCapabilitiesCaptions', $this->_buildCapabilitiesValues()); $tpl->assign('arCapabilities', $arCapabilities); $tpl->assign('arCapabilitiesPath', $arCapabilitiesPath = CopixProfileTools::getCapabilitiesPath()); //appel du template. $toReturn = $tpl->fetch('group.edit.tpl'); return true; }