當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。