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


PHP Project::LoadAll方法代码示例

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


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

示例1: tblProjects_Bind

 /**
  * Bind the Projects table to the html table.
  *
  * @throws QCallerException
  */
 protected function tblProjects_Bind()
 {
     // Expand the PersonAsTeamMember node as an array so that it will be included in each item sent to the columns.
     $clauses = QQ::ExpandAsArray(QQN::Project()->PersonAsTeamMember);
     // We load the data source, and set it to the datagrid's DataSource parameter
     $this->tblProjects->DataSource = Project::LoadAll($clauses);
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:12,代码来源:column_values.php

示例2: dtgProjects_Bind

 protected function dtgProjects_Bind()
 {
     $this->dtgProjects->TotalItemCount = Project::QueryCount(QQ::All());
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->dtgProjects->OrderByClause) {
         $objClauses[] = $objClause;
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->dtgProjects->LimitClause) {
         $objClauses[] = $objClause;
     }
     $this->dtgProjects->DataSource = Project::LoadAll($objClauses);
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:14,代码来源:project_list.php

示例3: Form_Create

 protected function Form_Create()
 {
     // Setup the Dropdown of Project Names
     $this->lstProjects = new QListBox($this);
     $this->lstProjects->AddItem('- Select One -', null, true);
     foreach (Project::LoadAll(QQ::Clause(QQ::OrderBy(QQN::Project()->Name))) as $objProject) {
         $this->lstProjects->AddItem($objProject->Name, $objProject->Id);
     }
     $this->lstProjects->AddAction(new QChangeEvent(), new QAjaxAction('lstProjects_Change'));
     // Setup our Left and Right Panel Placeholders
     // Notice that both panels have "AutoRenderChildren" set to true so that
     // instantiated child panels will automatically get displayed
     $this->pnlLeft = new QPanel($this);
     $this->pnlLeft->Position = QPosition::Relative;
     $this->pnlLeft->CssClass = 'panelDefault';
     $this->pnlLeft->AutoRenderChildren = true;
     $this->pnlRight = new QPanel($this);
     $this->pnlRight->Position = QPosition::Relative;
     $this->pnlRight->CssClass = 'panelDefault panelRight';
     $this->pnlRight->AutoRenderChildren = true;
     $this->objDefaultWaitIcon = new QWaitIcon($this);
 }
开发者ID:eliud254,项目名称:q-auction,代码行数:22,代码来源:intro.php

示例4:

	and in doing so they can unnecessarily overengineer some pieces of functionality.
	If the focus is on getting the application functional, first, then after the application is in
	a usable state, you can profile the functionality that tends to get used more often and simply
	focus on optimizing this smaller subset of heavily-used functionality.</p>

	<p>For information about Expanding through Association Tables, please refer to the
	<a href="../qcubed_query/association.php">Handling Association Tables example</a>.</p>
</div>

<div id="demoZone">
	<h2>List All Projects and its Manager</h2>
<?php 
// Enable Profiling (we're assuming the Examples Site Database is at index 1)
// NOTE: Profiling should only be enabled when you are actively wanting to profile a specific PHP script.
// Because of SIGNIFICANT performance degradation, it should otherwise always be off.
QApplication::$Database[1]->EnableProfiling();
// Load the Project array
// The following line of code is the ONLY line of code we will modify
$objProjectArray = Project::LoadAll(QQ::Clause(QQ::Expand(QQN::Project()->ManagerPerson)));
foreach ($objProjectArray as $objProject) {
    _p(QApplication::HtmlEntities($objProject->Name) . ' is managed by ' . $objProject->ManagerPerson->FirstName . ' ' . $objProject->ManagerPerson->LastName);
    _p('<br/>', false);
}
_p('<br/>', false);
// Output Profiling Data
QApplication::$Database[1]->OutputProfiling();
?>
</div>

<?php 
require '../includes/footer.inc.php';
开发者ID:tomVertuoz,项目名称:framework,代码行数:31,代码来源:early_bind.php

示例5: projects

		<b>ManagerPerson</b>.  Using the built in Qcodo Database Profiler, you can see that
		five database calls are made: One call to get all the projects (four rows in all), and then four calls
		to <b>Person::Load</b> (one for each of those projects).
	</div>


	<h3>List All the Projects and View Its Manager</h3>
<?php 
// Enable Profiling (we're assuming the Examples Site Database is at index 1)
// NOTE: Profiling should only be enabled when you are actively wanting to profile a specific PHP script.
// Because of SIGNIFICANT performance degradation, it should otherwise always be off.
QApplication::$Database[1]->EnableProfiling();
// Load the Project array
// Note how even though we make two calls to ManagerPerson PER project, only ONE call to
// Person::Load is made per project -- this is because ManagerPerson is bound to the
// Project during the first call.  So the second call is using the ManagerPerson that's
// already bound to that project object.
$objProjectArray = Project::LoadAll();
foreach ($objProjectArray as $objProject) {
    _p($objProject->Name . ' is managed by ' . $objProject->ManagerPerson->FirstName . ' ' . $objProject->ManagerPerson->LastName);
    _p('<br/>', false);
}
_p('<br/>', false);
// Output Profiling Data
QApplication::$Database[1]->OutputProfiling();
?>



<?php 
require __INCLUDES__ . '/examples/footer.inc.php';
开发者ID:qcodo,项目名称:qcodo,代码行数:31,代码来源:late_bind.php

示例6: dtgProjects_Bind

    public function dtgProjects_Bind()
    {
        // Get Total Count b/c of Pagination
        $this->dtgProjects->TotalItemCount = Project::CountAll();
        $objClauses = array();
        if ($objClause = $this->dtgProjects->OrderByClause) {
            $objClauses[] = $objClause;
        }
        if ($objClause = $this->dtgProjects->LimitClause) {
            $objClauses[] = $objClause;
        }
        // Create a virtual attribute that lets us know if this Project is related to ACME
        $objClauses[] = QQ::Expand(QQ::Virtual('assn_item', QQ::SubSql('select 
							project_id
					 	from 
					 		related_project_assn
					 	where 
							child_project_id = {1} 
							 and project_id = 1', QQN::Project()->Id)));
        $this->dtgProjects->DataSource = Project::LoadAll($objClauses);
    }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:21,代码来源:qcheckboxcolumn.php

示例7: QRssFeed

<?php

require_once '../qcubed.inc.php';
// Setup the Feed, itself
$objRss = new QRssFeed('Examples Site Projects', 'http://examples.qcu.be/', 'An Example RSS feed of the Qcubed Examples Site Projects');
$objRss->Image = new QRssImage('http://www.qcu.be/sites/all/themes/qcubednew/images/QCubed.png');
$objRss->PubDate = new QDateTime(QDateTime::Now);
// Iterate through all the projects, and setup a QRssItem per project
// Limit it to the "10 most recently started projects"
foreach ($objProjects = Project::LoadAll(QQ::Clause(QQ::OrderBy(QQN::Project()->StartDate, false), QQ::LimitInfo(10))) as $objProject) {
    $objItem = new QRssItem($objProject->Name, 'http://examples.qcu.be/examples/communication/rss.php/' . $objProject->Id, $objProject->Description);
    $objItem->Author = $objProject->ManagerPerson->FirstName . ' ' . $objProject->ManagerPerson->LastName;
    $objItem->PubDate = $objProject->StartDate;
    $objItem->Guid = $objItem->Link;
    $objItem->GuidPermaLink = true;
    $objItem->AddCategory(new QRssCategory('Some Project Category 1'));
    $objItem->AddCategory(new QRssCategory('Some Project Category 2'));
    $objRss->AddItem($objItem);
}
// Output/Run the feed
// Note that the Run method will reset the output buffer and setup the Headers to output XML,
// so any HTML or Text outputted until now will be lost.  If for whatever reason you just
// want the XML, you can call $objRss->GetXml(), which will return the XML string.
// Also, if you need to change the encoding of the XML, you can do so in QApplication::$EncodingType.
$objRss->Run();
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:25,代码来源:rss_feed.php

示例8: lstProjectsAsTeamMember_Create

 protected function lstProjectsAsTeamMember_Create()
 {
     $this->lstProjectsAsTeamMember = new QListBox($this);
     $this->lstProjectsAsTeamMember->Name = QApplication::Translate('Projects As Team Member');
     $this->lstProjectsAsTeamMember->SelectionMode = QSelectionMode::Multiple;
     $objAssociatedArray = $this->objPerson->GetProjectAsTeamMemberArray();
     $objProjectArray = Project::LoadAll();
     if ($objProjectArray) {
         foreach ($objProjectArray as $objProject) {
             $objListItem = new QListItem($objProject->__toString(), $objProject->Id);
             foreach ($objAssociatedArray as $objAssociated) {
                 if ($objAssociated->Id == $objProject->Id) {
                     $objListItem->Selected = true;
                 }
             }
             $this->lstProjectsAsTeamMember->AddItem($objListItem);
         }
     }
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:19,代码来源:PersonEditPanel.class.php

示例9: tblProjects_Bind

 /**
  * Bind the Projects table to the html table.
  *
  * @throws QCallerException
  */
 protected function tblProjects_Bind()
 {
     // We load the data source, and set it to the datagrid's DataSource parameter
     $this->tblProjects->DataSource = Project::LoadAll();
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:10,代码来源:link_column.php


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