当前位置: 首页>>代码示例>>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;未经允许,请勿转载。