當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Project::yokohamaLocation方法代碼示例

本文整理匯總了PHP中Goteo\Model\Project::yokohamaLocation方法的典型用法代碼示例。如果您正苦於以下問題:PHP Project::yokohamaLocation方法的具體用法?PHP Project::yokohamaLocation怎麽用?PHP Project::yokohamaLocation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Goteo\Model\Project的用法示例。


在下文中一共展示了Project::yokohamaLocation方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getList

 /**
  * Metodo para sacar las que hay en proyectos
  * @return array strings
  */
 public static function getList()
 {
     $results = array();
     //            $sql = "SELECT distinct(project_location) as location
     //                    FROM project
     //                    WHERE status > 2
     //                    ORDER BY location ASC";
     //
     //            try {
     //                $query = Model::query($sql);
     //                foreach ($query->fetchAll(\PDO::FETCH_CLASS) as $item) {
     //                    $results[md5($item->location)] = $item->location;
     //                }
     //                return $results;
     //            } catch (\PDOException $e) {
     //                throw new Exception('Fallo la lista de localizaciones');
     //            }
     $_locations = Project::yokohamaLocation();
     foreach ($_locations as $_area) {
         $results[md5($_area)] = $_area;
     }
     return $results;
 }
開發者ID:kenjs,項目名稱:Goteo,代碼行數:27,代碼來源:location.php

示例2: edit


//.........這裏部分代碼省略.........
     $viewData = array('project' => $project, 'steps' => $steps, 'step' => $step);
     // segun el paso añadimos los datos auxiliares para pintar
     switch ($step) {
         case 'userProfile':
             $owner = Model\User::get($project->owner, null);
             // si es el avatar por defecto no lo mostramos aqui
             if ($owner->avatar->id == 1) {
                 unset($owner->avatar);
             }
             $viewData['user'] = $owner;
             $viewData['interests'] = Model\User\Interest::getAll();
             $viewData['skills'] = Model\Skill::getAll();
             if ($_POST) {
                 foreach ($_POST as $k => $v) {
                     if (!empty($v) && preg_match('/web-(\\d+)-edit/', $k, $r)) {
                         $viewData[$k] = true;
                     }
                 }
                 if (!empty($_POST['web-add'])) {
                     $last = end($owner->webs);
                     if ($last !== false) {
                         $viewData["web-{$last->id}-edit"] = true;
                     }
                 }
             }
             break;
         case 'userPersonal':
             $viewData['account'] = Model\Project\Account::get($project->id);
             break;
         case 'overview':
             $viewData['categories'] = Model\Project\Category::getAll();
             //                    $viewData['currently'] = Model\Project::currentStatus();
             //                    $viewData['scope'] = Model\Project::scope();
             $viewData['project_location'] = Model\Project::yokohamaLocation();
             break;
         case 'costs':
             $viewData['types'] = Model\Project\Cost::types();
             if ($_POST) {
                 foreach ($_POST as $k => $v) {
                     if (!empty($v) && preg_match('/cost-(\\d+)-edit/', $k, $r)) {
                         $viewData[$k] = true;
                     }
                 }
                 if (!empty($_POST['cost-add'])) {
                     $last = end($project->costs);
                     if ($last !== false) {
                         $viewData["cost-{$last->id}-edit"] = true;
                     }
                 }
             }
             break;
         case 'rewards':
             $viewData['itypes'] = Model\Project\Reward::icons('individual');
             $viewData['stypes'] = Model\Project\Reward::icons('social');
             $viewData['licenses'] = Model\Project\Reward::licenses();
             //                    $viewData['types'] = Model\Project\Support::types();
             if ($_POST) {
                 foreach ($_POST as $k => $v) {
                     if (!empty($v) && preg_match('/((social)|(individual))_reward-(\\d+)-edit/', $k)) {
                         $viewData[$k] = true;
                     }
                 }
                 if (!empty($_POST['social_reward-add'])) {
                     $last = end($project->social_rewards);
                     if ($last !== false) {
                         $viewData["social_reward-{$last->id}-edit"] = true;
開發者ID:kenjs,項目名稱:Goteo,代碼行數:67,代碼來源:project.php


注:本文中的Goteo\Model\Project::yokohamaLocation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。