本文整理汇总了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;
}
示例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;