本文整理汇总了PHP中Kernel::createCanon方法的典型用法代码示例。如果您正苦于以下问题:PHP Kernel::createCanon方法的具体用法?PHP Kernel::createCanon怎么用?PHP Kernel::createCanon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kernel
的用法示例。
在下文中一共展示了Kernel::createCanon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cityDatasProxy
public function cityDatasProxy($soapCity)
{
$city = new stdClass();
$city->nom = utf8_decode($soapCity);
$city->nomCanonique = Kernel::createCanon($city->nom);
return $city;
}
示例2: processValidateCityUpdate
/**
* validateCityUpdate
*
* Validation du formulaire d'édition de ville.
*
*/
public function processValidateCityUpdate()
{
$ppo = new CopixPPO();
$ppo->nodeId = _request('id_node', null);
if (is_null($ppo->nodeId)) {
return CopixActionGroup::process('generictools|Messages::getError', array('message' => "Une erreur est survenue.", 'back' => CopixUrl::get('gestionautonome||showTree')));
}
// Validation des paramètres
$cityDAO = _ioDAO('kernel|kernel_bu_ville');
if (!($ppo->city = $cityDAO->get($ppo->nodeId))) {
return CopixActionGroup::process('generictools|Messages::getError', array('message' => "Une erreur est survenue.", 'back' => CopixUrl::get('gestionautonome||showTree')));
}
_currentUser()->assertCredential('module:cities_group|' . $ppo->city->id_grville . '|city|update@gestionautonome');
// Nom courrant pour fil d'ariane
$name = $ppo->city->nom;
// Récupération des paramètres
$cityName = _request('nom', null);
$ppo->city->nom = trim($cityName);
$ppo->city->canon = Kernel::createCanon($cityName);
// Traitement des erreurs
$ppo->errors = array();
if (!$ppo->city->nom) {
$ppo->errors[] = 'Saisissez un nom';
}
if (!empty($ppo->errors)) {
// Breadcrumbs
$breadcrumbs = array();
$breadcrumbs[] = array('txt' => 'Gestion de la structure scolaire', 'url' => CopixUrl::get('gestionautonome||showTree'));
$breadcrumbs[] = array('txt' => $name);
$ppo->breadcrumbs = Kernel::PetitPoucet($breadcrumbs, ' » ');
$ppo->TITLE_PAGE = CopixConfig::get('gestionautonome|moduleTitle');
// Get vocabulary catalog to use
$nodeVocabularyCatalogDAO = _ioDAO('kernel|kernel_i18n_node_vocabularycatalog');
$ppo->vocabularyCatalog = $nodeVocabularyCatalogDAO->getCatalogForNode('BU_CITY', $ppo->nodeId);
return _arPPO($ppo, 'edit_city.tpl');
}
$cityDAO->update($ppo->city);
return _arRedirect(CopixUrl::get('gestionautonome||showTree', array('save' => 'cityUpdated')));
}