当前位置: 首页>>代码示例>>PHP>>正文


PHP Project::get方法代码示例

本文整理汇总了PHP中Project::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::get方法的具体用法?PHP Project::get怎么用?PHP Project::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Project的用法示例。


在下文中一共展示了Project::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: all_get

 /**
  * Projects list
  * @route GET projects all
  * @param type $token
  */
 public function all_get($token)
 {
     $token_entry = new Token();
     $token_entry->get_by_valid_token($token)->get();
     if ($token_entry->exists()) {
         $projects = new Project();
         $projects->order_by('name', 'ASC');
         $projects->get();
         $response = array();
         foreach ($projects as $project) {
             $p = new stdClass();
             $p->id = $project->id;
             $p->name = $project->name;
             $p->customer_name = $project->Customer->get()->customer_name;
             if (!$p->customer_name) {
                 $p->customer_name = '-';
             }
             $p->closed = $project->closed ? TRUE : FALSE;
             $p->gitlab_project_id = $project->gitlab_project_id;
             array_push($response, $p);
         }
         $this->response($response);
     } else {
         $response = new stdClass();
         $response->status = false;
         $response->error = 'Token not found or session expired';
         $this->response($response);
     }
 }
开发者ID:NaszvadiG,项目名称:crono,代码行数:34,代码来源:projects.php

示例2: get

 function get($criteria = null)
 {
     $user = current_user();
     $projects = new Project();
     $activity = new Activity();
     $this->projects = $projects->get();
     $this->activity = $activity->get();
 }
开发者ID:neevan1e,项目名称:Done,代码行数:8,代码来源:dashboard.php

示例3: estimateInfo

function estimateInfo($estimate, $o = array())
{
    $r = getRenderer();
    $project = new Project($estimate->get('project_id'));
    $project_link = $r->link('Project', array('action' => 'show', 'id' => $project->id), $project->get('name'));
    $list_items = array('Estimate' => $estimate->getName(), 'Project' => $project_link, 'Due Date' => $estimate->getData('due_date'), 'High Estimate' => $estimate->getHighEstimate(), 'Low Estimate' => $estimate->getLowEstimate(), 'Total Hours' => $estimate->getTotalHours(), 'Billable Hours' => $estimate->getBillableHours(), 'Completed' => $estimate->getData('completed') ? 'yes' : 'no', 'Notes' => $estimate->getData('notes'), 'Category' => $estimate->get('category'));
    return $r->view('basicList', $list_items);
}
开发者ID:radicaldesigns,项目名称:gtd,代码行数:8,代码来源:estimate_info.php

示例4: addtaskForm

 public function addtaskForm()
 {
     $project = Project::get()->map('ID', 'Title');
     DateField::set_default_config('showcalendar', true);
     DateField::set_default_config('dateformat', 'dd/MM/YYYY');
     $fields = new FieldList(new DropDownField('ProjectID', 'Project', $project), new TextField('Title'), new TextAreaField('Description'), new DropDownField("Status", "Status", singleton('Task')->dbObject('Status')->enumValues()), new DateField('DueDate', 'Due Date'), new NumericField('OriginalHourEstimate', 'Est. in Hours'));
     $actions = new FieldList(new FormAction('dotaskadd', 'Submit'));
     return new Form($this, 'addtaskForm', $fields, $actions);
 }
开发者ID:micschk,项目名称:SilverProject,代码行数:9,代码来源:addTaskPage.php

示例5: load

 public function load()
 {
     parent::load();
     $model = new Project();
     $this->view->projects = $model->get();
     if (isset($_REQUEST["project_attrs_showpublication"])) {
         $model = new ProjectPublication();
         $this->view->publications = $model->getindex();
     }
     $this->setpagetitle(self::default_title());
 }
开发者ID:wangfeilong321,项目名称:myosg,代码行数:11,代码来源:MiscprojectController.php

示例6: __construct

 function __construct($controller, $name)
 {
     Requirements::css(THEMES_DIR . "/openstack/css/OsLogoProgramForm.css");
     Requirements::customScript("\n            jQuery(document).ready(function() {\n\n                if(\$('#OsLogoProgramForm_Form_CurrentSponsor').prop('checked') != true){\n                    \$('#openstack-companies').hide();\n                    \$('#non-sponsor-company').show();                    \n                } else {\n                    \$('#openstack-companies').show();\n                    \$('#non-sponsor-company').hide();                                        \n                }\n\n                \$('#OsLogoProgramForm_Form_CurrentSponsor').click(function () {                \n                    \$('#openstack-companies').toggle();\n                    \$('#non-sponsor-company').toggle();\n                });\n            });\n        ");
     $companies = Company::get()->filter('MemberLevel:not', 'Mention')->where('MemberLevel IS NOT NULL')->sort('Name', 'ASC');
     if ($companies) {
         $companiesField = new DropdownField('CompanyID', 'Company', $companies->map('ID', 'Name', '--Select Company--'));
     }
     $projects = Project::get();
     if ($projects) {
         $projectsField = new CheckboxSetField('Projects', 'Select the OpenStack projects your product uses:', $projects->map('Name', 'Name'));
     }
     $fields = new FieldList(new TextField('FirstName', 'First Name'), new TextField('Surname', 'Last Name'), new EmailField('Email', 'Email Address'), new TextField('Phone', 'Phone Number'), new CheckboxSetField('Program', 'Which logo program best fits your product offering?', OsLogoProgramResponse::$avialable_programs), new LiteralField('HR', '<hr/>'), new CheckboxField('CurrentSponsor', 'My company is a Corporate Sponsor or Gold/Platinum Member of the OpenStack Foundation.'), new LiteralField('DIV', '<div id="openstack-companies">'), $companiesField, new TextField('OtherCompany', 'Other Company (if not listed above)'), new LiteralField('DIV', '</div>'), new LiteralField('DIV', '<div id="non-sponsor-company">'), new TextField('NonSponsorCompany', 'Company Name'), new LiteralField('DIV', '</div>'), new TextField('Product', 'Product or Service Name'), new LiteralField('ProductNote', 'If your proposed product name includes the OpenStack word mark, it will need to be approved as part of the licensing process.<br><br>'), new LiteralField('HR', '<hr/>'), new TextAreaField('CompanyDetails', 'Product or Service Description'), new CheckboxSetField('Category', 'Which of the following categories does your product fit into?  This will help us recommend the approprite licensing and associated marketing programs and assets:', OsLogoProgramResponse::$avialable_categories), new CheckboxSetField('Regions', 'In which regions does your company operate?', OsLogoProgramResponse::$avialable_regions), $projectsField, new CheckboxField('APIExposed', 'My product exposes the OpenStack API'));
     $actionButton = new FormAction('save', 'Request Information');
     $actions = new FieldList($actionButton);
     $validator = new RequiredFields('FirstName', 'Surname', 'Email', 'Phone');
     parent::__construct($controller, $name, $fields, $actions, $validator);
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:18,代码来源:OSLogoProgramForm.php

示例7: _AggregatedProjects

 public function _AggregatedProjects()
 {
     // $filter = "";
     // // Filter for local vs national blog
     // if(!$s = Subsite::currentSubsiteId()) {
     //   $filter .= "(Featured=1 OR SubsiteID=0)";
     // }
     // else{
     //   $filter .= "(SubsiteID=$s OR (SubsiteID=0 AND Circulate=1))";
     // }
     // // Category filter
     // if($category = $this->request->param('Action')=='category') {
     //   $category = $this->_getCurrentCategory();
     //   $filter .= " AND BlogCategoryID = $category->ID";
     // }
     return Project::get();
     //->where($filter);
 }
开发者ID:KINKCreative,项目名称:actors,代码行数:18,代码来源:ProjectPage.php

示例8: handlePhpError

 public function handlePhpError($errno, $errstr, $errfile, $errline)
 {
     $errortype = array(E_ERROR => "Error", E_WARNING => "Warning", E_PARSE => "Parsing Error", E_NOTICE => "Notice", E_CORE_ERROR => "Core Error", E_CORE_WARNING => "Core Warning", E_COMPILE_ERROR => "Compile Error", E_COMPILE_WARNING => "Compile Warning", E_USER_ERROR => "User Error", E_USER_WARNING => "User Warning", E_USER_NOTICE => "User Notice", E_STRICT => "Runtime Notice");
     // set of errors for which a var trace will be saved
     //	    $user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);
     $err = "[" . $errortype[$errno] . "] " . $errno . "; Script: " . $errfile . "; Line: " . $errline . "; Msg: " . $errstr;
     //	    if (in_array($errno, $user_errors)) {
     //	        $err .= " Var dump: " . print_r($vars) . ";";
     //	    }
     // TODO:: generate exception, if error has level for exception
     //вывод в протокол
     if ($log = Project::get($this->_config->get('logger_id'))) {
         $log->writeLog($err);
     }
     if ($this->_config->get('send_mail') === true) {
         //отправка админу на мыло TODO:: mail params get from configuration
         if ($errno == E_USER_ERROR) {
             $mail = new CMailer("Server", "Server", "Admin", ADMIN_MAIL, "Critical User Error", $err, true);
         }
     }
 }
开发者ID:amanai,项目名称:next24,代码行数:21,代码来源:CErrorHandler.php

示例9: datalist_order

 private function datalist_order($xml)
 {
     if (!$this->bind_check($xml)) {
         return;
     }
     $uid = $this->user_profile->id;
     $from = $xml->FromUserName;
     $to = $xml->ToUserName;
     $url = _url('user/order/datalist');
     if (ENV == 'dev') {
         $url = preg_replace('/^https/', 'http', $url);
     }
     $in = Db::build_in_string(array(Order::STATUS_NEW, Order::STATUS_BLOCK, Order::STATUS_PAYDONE));
     $where = "user_id='{$uid}' and status in ({$in})";
     $orders = Order::find(0, 2, $where, 'time desc');
     $ret_text = '';
     if (!$orders) {
         $ret_text = '很遗憾,您在懒投资平台暂无投资记录。';
     } else {
         foreach ($orders as $key => $order) {
             $prj = Project::get($order->project_id);
             $total_rate = $prj->anual_rate + $prj->platform_rate + $prj->event_rate;
             $ret_text .= "单  号: {$order->id}\n";
             $ret_text .= "投资时间: {$order->time}\n";
             $ret_text .= "项目名称: {$prj->title}\n";
             $ret_text .= "预期年化: {$total_rate}%\n";
             $ret_text .= "项目期限: {$prj->days} 天\n";
             $ret_text .= "投资金额: " . Money::fen2yuan($order->amount) . " 元\n\n";
         }
     }
     $news_arr = array(array('title' => '投资记录', 'desc' => $ret_text, 'link' => $url));
     $this->wx_reply->imm_reply_news($to, $from, $news_arr);
 }
开发者ID:zxw5775,项目名称:yuhunclub,代码行数:33,代码来源:msg.php

示例10: array

<?php

require_once 'init.php';
use Agil\View\View;
use Agil\Session\Session;
try {
    $logado = Session::get('logado');
    $request = View::route($_GET);
    $pk = $request['pk'];
    $id = $logado['id_member'];
    $sql = array('id_project' => $pk, 'status' => '1');
    $project = new Project();
    $project->fields = array('id_admin', 'title', 'website');
    $rs = $project->get($sql);
    $rs = $rs[0];
    $sql = array('id_member' => $rs['id_admin'], 'status' => '1');
    $image = new MemberImage();
    $rsImage = $image->get($sql);
    $rsImage = $rsImage ? $rsImage[0] : null;
} catch (Exception $e) {
    echo "Desculpe acabou o café";
}
?>
<div class="container">
	<div class="col-12">
		<form action="/app/team/project_member/" method="post" target="compiler">
			<div class="form-group">
				<label>Projeto</label>
				<input type="text" name="name" value="<?php 
echo $rs['title'];
?>
开发者ID:Wellington475,项目名称:agil-framework,代码行数:31,代码来源:form_config.php

示例11: Experience

require_once 'include/config.php';
///////////////////////////////////////////////////////////
// VARIABLES
//$_SESSION['language_locale'] = 'ES_ES';
//$_SESSION['language_id'] = $objLang->get(array("language_locale" => $_SESSION['language_locale']), "language_id");
///////////////////////////////////////////////////////////
// Texts
//$objTrad = new Traduction();
$arrText = $objTrad->get(array("language_id" => $_SESSION['language_id']));
// Experiences
$objExperience = new Experience();
$arrExperience = $objExperience->get(array("language_id" => $_SESSION['language_id']));
// Projects
$objProject = new Project();
$arrProject = $objProject->get(array("language_id" => $_SESSION['language_id'], "project_image_type_id" => IMAGE_TYPE_MINI));
// Util
$objUtil = new Util();
?>
 

<!-- Header CSS + JS -->
<?php 
include 'include/header.php';
?>

	<body>	
		
		<!-- Line top -->
		<?php 
include 'include/switcher.php';
开发者ID:par-orillonsoft,项目名称:my-website,代码行数:30,代码来源:index.php

示例12: AddTrainingCourseForm

 function AddTrainingCourseForm()
 {
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
     Requirements::javascript("datepicker/javascript/datepicker.js");
     Requirements::javascript('registration/javascript/edit.profile.training.form.js');
     // Name Set
     $Name = new TextField('Name', "Name");
     $Name->addExtraClass('course-name');
     $Link = new TextField('Link', "Link");
     $Link->addExtraClass('course-online-link url');
     $Description = new TextareaField('Description', "Description");
     $Description->addExtraClass('course-description');
     $Online = new CheckboxField('Online', "Is Online?");
     $Online->addExtraClass('course-online-checkbox');
     $Paid = new CheckboxField('Paid', "Is Paid?");
     $Level = new DropdownField('LevelID', 'Level', TrainingCourseLevel::get()->map('ID', 'Level'));
     $Projects = new CheckboxSetField('Projects', '', Project::get()->map('ID', 'Name'));
     $Program = new HiddenField('TrainingServiceID', "TrainingServiceID", $this->training_id);
     $Course = new HiddenField('ID', "course", 0);
     $show_blank_schedule = true;
     if (isset($this->EditCourseID)) {
         $locations_dto = $this->course_repository->getLocations($this->EditCourseID);
         for ($i = 0; $i < count($locations_dto); $i++) {
             $dto = $locations_dto[$i];
             $show_blank_schedule = false;
             $City[$i] = new TextField('City[' . $i . ']', "City", $dto->getCity());
             $City[$i]->addExtraClass('city_name');
             $State[$i] = new TextField('State[' . $i . ']', "State", $dto->getState());
             $State[$i]->addExtraClass('state');
             $Country[$i] = new DropdownField('Country[' . $i . ']', $dto->getCountry(), CountryCodes::$iso_3166_countryCodes, $dto->getCountry());
             $Country[$i]->setEmptyString('-- Select One --');
             $Country[$i]->addExtraClass('country');
             $LinkS[$i] = new TextField('LinkS[' . $i . ']', "Link", $dto->getLink());
             $LinkS[$i]->addExtraClass('url');
             $StartDate[$i] = new TextField('StartDate[' . $i . ']', "Start Date", is_null($dto->getStartDate()) ? '' : $dto->getStartDate());
             $StartDate[$i]->addExtraClass('dateSelector start');
             $EndDate[$i] = new TextField('EndDate[' . $i . ']', "End Date", is_null($dto->getEndDate()) ? '' : $dto->getEndDate());
             $EndDate[$i]->addExtraClass('dateSelector end');
         }
     }
     if ($show_blank_schedule) {
         $City = new TextField('City[]', "City");
         $City->addExtraClass('city_name');
         $State = new TextField('State[]', "State");
         $State->addExtraClass('state');
         $Country = new DropdownField('Country[]', 'Country', CountryCodes::$iso_3166_countryCodes);
         $Country->setEmptyString('-- Select One --');
         $Country->addExtraClass('country');
         $StartDate = new TextField('StartDate[]', "Start Date");
         $StartDate->addExtraClass('dateSelector start');
         $EndDate = new TextField('EndDate[]', "End Date");
         $EndDate->addExtraClass('dateSelector end');
         $LinkS = new TextField('LinkS[]', "Link");
         $LinkS->addExtraClass('url');
     }
     $fields = new FieldList($Name, $Description, $Link, new LiteralField('break', '<hr/><div class="horizontal-fields">'), $Online, $Paid, $Level, $Program, $Course, new LiteralField('break', '</div><hr/>'), new LiteralField('projects', '<h4>Projects</h4>'), $Projects, new LiteralField('schedule', '<h4>Schedule</h4>'), new LiteralField('instruction', '<p class="note_online">City, State and Country can\'t be edited when a course is marked <em>Online</em>.</p>'), new LiteralField('scheduleDiv', '<div id="schedules">'));
     if (!$show_blank_schedule) {
         for ($j = 0; $j < $i; $j++) {
             $fields->push(new LiteralField('scheduleDiv', '<div class="scheduleRow">'));
             $fields->push($City[$j]);
             $fields->push($State[$j]);
             $fields->push($Country[$j]);
             $fields->push($StartDate[$j]);
             $fields->push($EndDate[$j]);
             $fields->push($LinkS[$j]);
             $fields->push(new LiteralField('scheduleDiv', '</div>'));
         }
     } else {
         $fields->push(new LiteralField('scheduleDiv', '<div class="scheduleRow">'));
         $fields->push($City);
         $fields->push($State);
         $fields->push($Country);
         $fields->push($StartDate);
         $fields->push($EndDate);
         $fields->push($LinkS);
         $fields->push(new LiteralField('scheduleDiv', '</div>'));
     }
     $fields->push(new LiteralField('scheduleDivC', '</div>'));
     $fields->push(new LiteralField('addSchedule', '<button id="addSchedule" class="action">Add Another</button>'));
     $actions = new FieldList(new FormAction('AddCourse', 'Submit'));
     $validators = new ConditionalAndValidationRule(array(new RequiredFields('Name', 'Level'), new HtmlPurifierRequiredValidator('Description')));
     $form = new Form($this, 'AddTrainingCourseForm', $fields, $actions, $validators);
     if (isset($this->EditCourseID)) {
         $form->loadDataFrom($this->course_repository->getById($this->EditCourseID));
         unset($this->EditCourseID);
     } else {
         $form->loadDataFrom($this->request->postVars());
     }
     return $form;
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:91,代码来源:EditProfilePage.php

示例13: accessLog

 private function accessLog($method, $line, $str)
 {
     if (($logger = Project::get($this->_config->get('logger_id'))) !== null) {
         $logger->writeLog($method . "::" . $line . "::" . $str);
     }
 }
开发者ID:amanai,项目名称:next24,代码行数:6,代码来源:AppAutorization.php

示例14: getCMSFields

 /** static $icon = "icon/path"; */
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     //
     // Add in the projects tab with a checklist of projects
     //
     // Get all existing projects
     $projects = Project::get();
     if (!empty($projects)) {
         // create an arry('ID' => 'Name')
         $map = $projects->map('ID', 'Name');
         // create a Checkbox group based on the array
         $fields->addFieldToTab('Root.Projects', new CheckboxSetField($name = 'Projects', $title = 'Select Projects', $source = $map));
     }
     //
     // Add a image field for uploading Logo
     $logo = new CustomUploadField('Logo', 'Logo');
     $logo->setAllowedFileCategories('image');
     $logo->setFolderName('logos');
     $fields->addFieldToTab("Root.Main", $logo);
     //
     // Add fields for quote and quote author
     //
     $fields->addFieldToTab("Root.Main", new TextAreaField('PullQuote', 'Company quote about Openstack'));
     $fields->addFieldToTab("Root.Main", new TextField('PullQuoteAuthor', 'Author of the quote'));
     //
     // Add in the files tab to upload files
     //
     $fields->addFieldToTab("Root.Files", new GridField('Attachments', 'Attachments', $this->Attachments()));
     //
     // Add in the Photos tab to upload photos
     //
     $imagesTable = new GridField('Photos', 'Photos', $this->Photos());
     $fields->addFieldToTab('Root.Photos', $imagesTable);
     //
     // Add in the Links tab to set links for the OpenStack User
     //
     $linksTable = new GridField('Links', 'Links', $this->Links());
     $fields->addFieldToTab('Root.Links', $linksTable);
     //
     // Hide unneeded tabs and rename the main tab
     //
     $fields->removeFieldsFromTab('Root', array('GoogleSitemap'));
     $fields->fieldByName('Root.Main')->setTitle('User Details');
     //
     // Adjust the fields on the newly renamed User Details tab
     //
     $fields->removeFieldFromTab("Root.Main", "MenuTitle");
     $fields->renameField("Title", "Company / Org Name");
     $fields->renameField("Content", "Company / Org Description");
     $fields->addFieldToTab('Root.Main', new CheckboxField('ListedOnSite', 'Display this company on OpenStack.org'), 'Content');
     $fields->addFieldToTab('Root.Main', new CheckboxField('FeaturedOnSite', 'Feature this company on the main User Stories page'), 'Content');
     $fields->addFieldToTab('Root.Main', new TextField('URL', 'Company URL'), 'Content');
     $fields->addFieldToTab('Root.Main', new TextField('Headquarters', 'Company Headquarters (Location)'), 'Content');
     $fields->addFieldToTab('Root.Main', new TextField('Industry'), 'Content');
     $fields->addFieldToTab('Root.Main', new HTMLEditorField('Objectives', 'Objectives for deploying OpenStack'), 'Content');
     //
     // Add category fields
     //
     $fields->addFieldToTab("Root.Main", new DropdownField('Category', 'Choose a category', $this->dbObject('Category')->enumValues()), 'Content');
     $fields->addFieldToTab("Root.Main", new DropdownField('Use Case', 'Choose a use case', $this->dbObject('UseCase')->enumValues()), 'Content');
     return $fields;
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:64,代码来源:OpenstackUser.php

示例15: getoldProjects

 public function getoldProjects()
 {
     $projects = Project::get()->sort('DueDate');
     return $projects;
 }
开发者ID:micschk,项目名称:SilverProject,代码行数:5,代码来源:ProjectPage.php


注:本文中的Project::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。