Пример #1
0
 public function getPathTo(array $breadcrumb, EiProjet $ei_project, EiProfil $ei_profile)
 {
     $chemin = $this->getNode()->getPathTo();
     $base_uri = array('project_id' => $ei_project->getProjectId(), 'project_ref' => $ei_project->getRefId(), 'profile_id' => $ei_profile->getProfileId(), 'profile_ref' => $ei_profile->getProfileRef(), 'profile_name' => $ei_profile->getName());
     foreach ($chemin as $i => $node) {
         if ($node->getType() == 'EiFolder') {
             $path_folder = $base_uri;
             $path_folder['folder_id'] = $node->getObjId();
             $path_folder['node_id'] = $node->getId();
             $path_folder['action'] = 'edit';
             $uri = url_for2('path_folder', $path_folder);
             $logo = ei_icon('ei_folder', null, null, null, 'ei-folder');
         } else {
             $logo = ei_icon('ei_scenario');
             $projet_new_eiversion = $base_uri;
             $projet_new_eiversion['ei_scenario_id'] = $node->getObjId();
             $projet_new_eiversion['action'] = 'editVersionWithoutId';
             $uri = url_for2('projet_new_eiversion', $projet_new_eiversion);
         }
         $breadcrumb[] = array('logo' => $logo, 'title' => $node, 'uri' => $uri, 'active' => false, 'is_last_bread' => false);
     }
     return $breadcrumb;
 }
Пример #2
0
 public function updateExistProfile(EiProfil $profile, Doctrine_Connection $conn = null)
 {
     if ($conn == null) {
         $conn = Doctrine_Manager::connection();
     }
     $conn->createQuery()->update('EiProfil')->set('name', '?', $profile->getName())->set('base_url', '?', $profile->getBaseUrl())->set('description', '?', $profile->getDescription())->set('is_default', '?', $profile->getIsDefault())->set('parent_id', '?', $profile->getParentId())->set('parent_ref', '?', $profile->getParentRef())->where('profile_id=? And profile_ref=? ', array($profile->getProfileId(), $profile->getProfileRef()))->execute();
 }