本文整理汇总了PHP中QQ::Equal方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::Equal方法的具体用法?PHP QQ::Equal怎么用?PHP QQ::Equal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQ
的用法示例。
在下文中一共展示了QQ::Equal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dtgStaff_Bind
public function dtgStaff_Bind()
{
$objConditions = QQ::All();
if ($this->lstMinistry->SelectedValue) {
$objConditions = QQ::AndCondition($objConditions, QQ::Equal(QQN::Login()->Ministry->MinistryId, $this->lstMinistry->SelectedValue));
}
if ($this->lstActiveFlag->SelectedValue) {
$objConditions = QQ::AndCondition($objConditions, QQ::Equal(QQN::Login()->DomainActiveFlag, true), QQ::Equal(QQN::Login()->LoginActiveFlag, true));
} else {
$objConditions = QQ::AndCondition($objConditions, QQ::OrCondition(QQ::Equal(QQN::Login()->DomainActiveFlag, false), QQ::Equal(QQN::Login()->LoginActiveFlag, false)));
}
$this->dtgStaff->TotalItemCount = Login::QueryCount($objConditions);
// Setup the $objClauses Array
$objClauses = array();
// 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->dtgStaff->OrderByClause) {
array_push($objClauses, $objClause);
}
// Add the LimitClause information, as well
if ($objClause = $this->dtgStaff->LimitClause) {
array_push($objClauses, $objClause);
}
// Set the DataSource to be a Query result from Login, given the clauses above
$this->dtgStaff->DataSource = Login::QueryArray($objConditions, $objClauses);
}
示例2: Form_Create
protected function Form_Create()
{
$this->mctObject = ClassInstructorMetaControl::CreateFromPathInfo($this, QMetaControlCreateType::CreateOnRecordNotFound);
if ($this->mctObject->EditMode) {
$this->strPageTitle .= 'Edit Instructor';
} else {
$this->strPageTitle .= 'Create New Instructor';
}
$this->lstLogin = $this->mctObject->lstLogin_Create(null, QQ::OrCondition(QQ::AndCondition(QQ::IsNull(QQN::Login()->ClassInstructor->Id), QQ::Equal(QQN::Login()->LoginActiveFlag, true), QQ::Equal(QQN::Login()->DomainActiveFlag, true)), QQ::Equal(QQN::Login()->Id, $this->mctObject->ClassInstructor->LoginId)), QQ::OrderBy(QQN::Login()->FirstName, QQN::Login()->LastName));
$this->txtDisplayName = $this->mctObject->txtDisplayName_Create();
$this->txtDisplayName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
$this->btnSave = new QButton($this);
$this->btnSave->CssClass = 'primary';
$this->btnSave->Text = $this->mctObject->EditMode ? 'Update' : 'Create';
$this->btnSave->CausesValidation = true;
$this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
$this->btnSave->AddAction(new QClickEvent(), new QTerminateAction());
$this->btnCancel = new QLinkButton($this);
$this->btnCancel->CssClass = 'cancel';
$this->btnCancel->Text = 'Cancel';
$this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click'));
$this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
if ($this->mctObject->EditMode) {
$this->btnDelete = new QLinkButton($this);
$this->btnDelete->CssClass = 'delete';
$this->btnDelete->Text = 'Delete';
$this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to PERMANENTLY DELETE this?'));
$this->btnDelete->AddAction(new QClickEvent(), new QAjaxAction('btnDelete_Click'));
$this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
}
}
示例3: CreateGroupParticipations
function CreateGroupParticipations(mysqli $objAcsDatabase, Group $objGroup, GroupRole $objRole, $intAcsGroupId, $intAcsReserveId)
{
print "Adding for Group: " . $objGroup->Name . "\r\n ";
if ($intAcsReserveId) {
$objResult = $objAcsDatabase->query(sprintf('select * from awgrrost where groupid=%s AND reserveid1=%s', $intAcsGroupId, $intAcsReserveId));
} else {
$objResult = $objAcsDatabase->query(sprintf('select * from awgrrost where groupid=%s', $intAcsGroupId));
}
while ($objRow = $objResult->fetch_array()) {
$objAttributeValueArray = AttributeValue::QueryArray(QQ::AndCondition(QQ::Equal(QQN::AttributeValue()->AttributeId, 2), QQ::Equal(QQN::AttributeValue()->TextValue, $objRow['indvid'])));
if (count($objAttributeValueArray) != 1) {
printf("Issue with awgrrost.pkid of %s - IndvId %s for Group %s - AVCount of %s\r\n", $objRow['pkid'], $objRow['indvid'], $objGroup->Name, count($objAttributeValueArray));
} else {
$objPerson = $objAttributeValueArray[0]->Person;
$dttStartDate = new QDateTime($objRow['dateadded']);
if ($objRow['dateremoved']) {
$dttEndDate = new QDateTime($objRow['dateremoved']);
} else {
$dttEndDate = null;
}
$objGroup->AddPerson($objPerson, $objRole->Id, $dttStartDate, $dttEndDate);
print "*";
}
}
print "\r\n Done.\r\n\r\n";
}
示例4: dtgWikiItems_Bind
public function dtgWikiItems_Bind()
{
$objCondition = QQ::All();
if (trim($this->txtTitle->Text)) {
$objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::WikiItem()->CurrentName, '%' . trim($this->txtTitle->Text) . '%'));
}
if ($strPath = trim($this->txtPath->Text)) {
$strPath = WikiItem::SanitizeForPath($strPath, $intWikiItemTypeId);
$objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::WikiItem()->Path, $strPath . '%'));
}
if ($intValue = $this->lstWikiItemType->SelectedValue) {
$objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::WikiItem()->WikiItemTypeId, $intValue));
}
if (trim($this->txtPostedBy->Text)) {
$objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::WikiItem()->CurrentPostedByPerson->DisplayName, trim($this->txtPostedBy->Text) . '%'));
}
$this->dtgWikiItems->TotalItemCount = WikiItem::QueryCount($objCondition);
$objClauses = array();
if ($objClause = $this->dtgWikiItems->LimitClause) {
$objClauses[] = $objClause;
}
if ($objClause = $this->dtgWikiItems->OrderByClause) {
$objClauses[] = $objClause;
}
$this->dtgWikiItems->DataSource = WikiItem::QueryArray($objCondition, $objClauses);
}
示例5: GetControlHtml
public function GetControlHtml()
{
$strLogContents = '';
foreach (NarroLog::QueryArray(QQ::AndCondition(QQ::Equal(QQN::NarroLog()->ProjectId, $this->intProjectId), QQ::Equal(QQN::NarroLog()->LanguageId, $this->intLanguageId), QQ::GreaterThan(QQN::NarroLog()->Date, $this->dttStart))) as $objLogEntry) {
switch ($objLogEntry->Priority) {
case NarroLog::PRIORITY_INFO:
$strLogContents .= '<div class="info"';
break;
case NarroLog::PRIORITY_WARN:
$strLogContents .= '<div class="warning"';
break;
case NarroLog::PRIORITY_ERROR:
$strLogContents .= '<div class="error"';
break;
default:
$strLogContents .= '<div';
}
$strLogContents .= sprintf('title="%s">%s</div>', $objLogEntry->Date, nl2br(NarroString::HtmlEntities($objLogEntry->Message)));
}
$this->strText = sprintf('<div class="ui-accordion ui-widget ui-helper-reset ui-accordion-icons">
<h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-state-active ui-corner-top">
<span class="ui-icon ui-icon-triangle-1-s"></span>
<a>%s</a>
</h3>
<div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="max-height:300px;overflow:auto">
%s
</div>
</div>', t('Operation log'), $strLogContents);
return parent::GetControlHtml();
}
示例6: render_btnToggleRecords
public function render_btnToggleRecords($parControl, $strType)
{
$strControlId = 'btnToggleRecordsforaddressofperson' . $strType->Id . 'ofproject' . $this->objProject->Id;
if (!($objControl = $parControl->GetChildControl($strControlId))) {
// But in this case the parent control of the button
// would be this child QDataGrid, don't forget that...
$person_addresses = Address::QueryCount(QQ::Equal(QQN::Address()->PersonId, $strType->Id));
if ($person_addresses > 0) {
$objControl = new QButton($parControl, $strControlId);
$objControl->Width = 20;
$objControl->Text = '+';
$objControl->CssClass = 'inputbutton';
$objControl->ActionParameter = "{$strType->Id}";
// Important! for a better coding we want to all
// actions referer to the child QdataGris stay
// in the child Qdatagrid, so the actions are now
// QAjaxControlAction or QServerControlAction, were the
// controlId parameter is $this, becaouse in $this class
// is defined the event for this button... kind of easy,
// and clean.
$objControl->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnToggleRecords_Click', $this->objParentObject->WaitIcon));
} else {
// No addresses to expand; we'll use an empty label control to signify that
$objControl = new QLabel($parControl, $strControlId);
$objControl->Text = '';
}
}
// We pass the parameter of "false" to make sure the control doesn't render
// itself RIGHT HERE - that it instead returns its string rendering result.
return $objControl->Render(false);
}
示例7: process_object
/**
* @param DleCategory $objDleCategory The DB ORM object to process
*/
protected function process_object($objDleCategory)
{
// wp: term_taxonomy_id, term_id, description, parent
// dl: id, id, descr, parentid
$wpTerms = $objDleCategory->LoadWpTerms();
if (!$wpTerms) {
throw QCallerException(QApplication::Translate("Failed to find the WpTerm object for DleCategory."));
}
$wpTermsParent = null;
if ($objDleCategory->ParentidObject) {
$wpTermsParent = $objDleCategory->ParentidObject->LoadWpTerms();
}
$intWpTermsParentId = 0;
if ($wpTermsParent) {
$intWpTermsParentId = $wpTermsParent->TermId;
}
// check if already copied
if (!WpTermTaxonomy::QueryCount(QQ::AndCondition(QQ::Equal(QQN::WpTermTaxonomy()->TermId, $wpTerms->TermId), QQ::Equal(QQN::WpTermTaxonomy()->Parent, $intWpTermsParentId)))) {
$objWpTermTaxonomy = new WpTermTaxonomy();
$objWpTermTaxonomy->Initialize();
// set defaults
$objWpTermTaxonomy->TermId = $wpTerms->TermId;
$objWpTermTaxonomy->Description = $objDleCategory->Descr;
$objWpTermTaxonomy->Parent = $intWpTermsParentId;
$objWpTermTaxonomy->Taxonomy = "category";
$objWpTermTaxonomy->Count = 0;
$objWpTermTaxonomy->Save();
$this->intTermTaxonomyCount++;
}
}
示例8: getPrimaryResource
function getPrimaryResource($strResourceName, $intResourceID, $arrVariables)
{
if ($intResourceID) {
$objPrimaryData = call_user_func(array(ucwords($strResourceName), 'Load'), $intResourceID);
} else {
// IF VARIABLES PASSED, USE IN QUERY
if (!empty($arrVariables)) {
$arrSearch = array();
// LOOP THROUGH VARIABLES
foreach ($arrVariables as $strField => $strValue) {
// IF NOT _VARIABLE
if (substr($strField, 0, 1) != '_') {
// ADD VARIABLE TO SEARCH ARRAY;
$objQQN = call_user_func(array('QQN', $strResourceName));
$objQQNode = $objQQN->{ucwords($strField)};
$arrSearch[] = QQ::Equal($objQQNode, $strValue);
}
}
if (!empty($arrSearch)) {
$objPrimaryData = call_user_func(array($strResourceName, 'QueryArray'), call_user_func(array('QQ', 'AndCondition'), $arrSearch));
} else {
$objPrimaryData = call_user_func(array($strResourceName, 'LoadAll'));
}
} else {
$objPrimaryData = call_user_func(array($strResourceName, 'LoadAll'));
}
}
return $objPrimaryData;
}
示例9: process_object
/**
* @param DleUsers $objDleUsers The DB ORM object to process
*/
protected function process_object($objDleUsers)
{
// wp: ID, user_login, user_nicename, user_email, user_registered, display_name
// dl: user_id, name, name, email, FROM_UNIXTIME( reg_date ), fullname
$strEmail = $objDleUsers->Email;
if ($strEmail && strlen($strEmail)) {
// check if already copied
if (!WpUsers::QueryCount(QQ::Equal(QQN::WpUsers()->UserEmail, $strEmail))) {
$objWpUsers = new WpUsers();
$objWpUsers->Initialize();
// set defaults
$objWpUsers->UserLogin = $objDleUsers->Name;
$objWpUsers->UserNicename = $objDleUsers->Name;
$objWpUsers->UserEmail = $objDleUsers->Email;
$objWpUsers->UserRegistered = QDateTime::FromTimestamp(intval($objDleUsers->RegDate));
$objWpUsers->DisplayName = $objDleUsers->Fullname;
$objWpUsers->UserPass = '';
$objWpUsers->UserUrl = '';
$objWpUsers->UserActivationKey = '';
$objWpUsers->UserStatus = 0;
$objWpUsers->Save();
$this->intUserCount++;
}
}
}
示例10: RestoreByNameForClass
public static function RestoreByNameForClass($strName, $intClassId, $strVersion, $objFile)
{
$objConstant = QcodoConstant::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::QcodoConstant()->QcodoClassId, $intClassId), QQ::Equal(QQN::QcodoConstant()->Variable->Name, $strName)));
if (!$objConstant) {
$objVariable = new Variable();
$objVariable->Name = $strName;
$objVariable->VariableTypeId = VariableType::String;
$objVariable->FirstVersion = $strVersion;
$objVariable->Save();
$objConstant = new QcodoConstant();
$objConstant->Variable = $objVariable;
$objConstant->File = $objFile;
$objConstant->QcodoClassId = $intClassId;
$objConstant->Save();
} else {
if ($objConstant->Variable->LastVersion) {
$objConstant->Variable->LastVersion = null;
$objConstant->Variable->Save();
}
if ($objFile->Id != $objConstant->intFileId) {
$objConstant->File = $objFile;
$objConstant->Save();
}
}
return $objConstant;
}
示例11: RestoreByNameForClass
public static function RestoreByNameForClass($strName, $intClassId, $strVersion, $objFile)
{
$objOperation = Operation::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::Operation()->QcodoClassId, $intClassId), QQ::Equal(QQN::Operation()->Name, $strName)));
if (!$objOperation) {
$objOperation = new Operation();
$objOperation->Name = $strName;
$objOperation->QcodoClassId = $intClassId;
$objOperation->FirstVersion = $strVersion;
$objOperation->File = $objFile;
$objOperation->Save();
} else {
$blnSave = false;
if ($objOperation->LastVersion) {
$objOperation->LastVersion = null;
$blnSave = true;
}
if ($objFile->Id != $objOperation->intFileId) {
$objOperation->File = $objFile;
$blnSave = true;
}
if ($blnSave) {
$objOperation->Save();
}
}
return $objOperation;
}
示例12: LoadWithToContactToUserByTransactionId
/**
* Load a single AssetTransactionCheckout object with expansion map of Contact and UserAccount,
* by TransactionId
* @param integer $intAssetId
* @return object $objAssetTransactionCheckout
*/
public function LoadWithToContactToUserByTransactionId($intAssetTransactionId = null)
{
$objClauses = array();
array_push($objClauses, QQ::Expand(QQN::AssetTransactionCheckout()->ToContact));
array_push($objClauses, QQ::Expand(QQN::AssetTransactionCheckout()->ToUser));
$objAssetTransactionCheckout = AssetTransactionCheckout::QuerySingle(QQ::Equal(QQN::AssetTransactionCheckout()->AssetTransactionId, $intAssetTransactionId), $objClauses);
return $objAssetTransactionCheckout;
}
示例13: LoadWpPosts
/**
* @return WpPosts|null The WpPosts object, that is a copy of this DLE post.
*/
public function LoadWpPosts()
{
$objWpUsers = $this->LoadWpUser();
if (!$objWpUsers) {
return null;
}
return WpPosts::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::WpPosts()->PostAuthor, $objWpUsers->Id), QQ::Equal(QQN::WpPosts()->PostDate, $this->Date), QQ::Equal(QQN::WpPosts()->PostName, $this->AltName)), QQ::Clause(QQ::LimitInfo(1)));
}
示例14: dtgProjects_Create
protected function dtgProjects_Create()
{
// Define the DataGrid
$this->dtgProjects = new QDataGrid($this);
$this->dtgProjects->ShowFilter = true;
// To create pagination, we will create a new paginator, and specify the datagrid
// as the paginator's parent. (We do this because the datagrid is the control
// who is responsible for rendering the paginator, as opposed to the form.)
$objPaginator = new QPaginator($this->dtgProjects);
$this->dtgProjects->Paginator = $objPaginator;
// Now, with a paginator defined, we can set up some additional properties on
// the datagrid. For purposes of this example, let's make the datagrid show
// only 5 items per page.
$this->dtgProjects->ItemsPerPage = 20;
// Define Columns
//Project Name
$colName = new QDataGridColumn('Project', '<?= $_ITEM->Name?>');
$colName->OrderByClause = QQ::OrderBy(QQN::Project()->Name);
$colName->ReverseOrderByClause = QQ::OrderBy(QQN::Project()->Name, false);
$this->dtgProjects->AddColumn($colName);
//Project type - filtered
$colType = new QDataGridColumn('Type', '<?= ProjectStatusType::ToString($_ITEM->ProjectStatusTypeId) ?>');
$colType->OrderByClause = QQ::OrderBy(QQN::Project()->ProjectStatusTypeId);
$colType->ReverseOrderByClause = QQ::OrderBy(QQN::Project()->ProjectStatusTypeId, false);
$colType->FilterType = QFilterType::ListFilter;
foreach (ProjectStatusType::$NameArray as $value => $name) {
$colType->FilterAddListItem($name, QQ::Equal(QQN::Project()->ProjectStatusTypeId, $value));
}
$this->dtgProjects->AddColumn($colType);
//Manager First Name
$colFName = new QDataGridColumn('First Name', '<?= $_ITEM->ManagerPerson->FirstName ?>');
$colFName->OrderByClause = QQ::OrderBy(QQN::Project()->ManagerPerson->FirstName);
$colFName->ReverseOrderByClause = QQ::OrderBy(QQN::Project()->ManagerPerson->FirstName, false);
$this->dtgProjects->AddColumn($colFName);
//Manager Last Name - filtered, only show with enabled logins
$colLName = new QDataGridColumn('Last Name', '<?= $_ITEM->ManagerPerson->LastName ?>');
$colLName->OrderByClause = QQ::OrderBy(QQN::Project()->ManagerPerson->LastName);
$colLName->ReverseOrderByClause = QQ::OrderBy(QQN::Project()->ManagerPerson->LastName, false);
QQN::Project()->ManagerPerson->LastName->SetFilteredDataGridColumnFilter($colLName);
$colLName->FilterConstant = QQ::Equal(QQN::Project()->ManagerPerson->Login->IsEnabled, true);
$this->dtgProjects->AddColumn($colLName);
// Specify the Datagrid's Data Binder method
$this->dtgProjects->SetDataBinder('dtgProjects_Bind');
/* * *********************** */
// Make the DataGrid look nice
$objStyle = $this->dtgProjects->RowStyle;
$objStyle->FontSize = 12;
$objStyle = $this->dtgProjects->AlternateRowStyle;
$objStyle->BackColor = '#f6f6f6';
$objStyle = $this->dtgProjects->HeaderRowStyle;
$objStyle->ForeColor = 'white';
$objStyle->BackColor = '#780000';
// Because browsers will apply different styles/colors for LINKs
// We must explicitly define the ForeColor for the HeaderLink.
// The header row turns into links when the column can be sorted.
$objStyle = $this->dtgProjects->HeaderLinkStyle;
$objStyle->ForeColor = 'white';
}
示例15: txtSearch_KeyUp
public function txtSearch_KeyUp()
{
if (strlen($this->txtSearch->Text) < 2 || preg_match("/^'.*'\$/", $this->txtSearch->Text) || preg_match('/^".*"$/', $this->txtSearch->Text)) {
$this->dtgSuggestion->AdditionalConditions = QQ::AndCondition(QQ::Equal(QQN::NarroSuggestion()->LanguageId, $this->lstLanguage->SelectedValue), QQ::Like(QQN::NarroSuggestion()->Text->TextValue, substr($this->txtSearch->Text, 1, -1)));
} else {
$this->dtgSuggestion->AdditionalConditions = QQ::AndCondition(QQ::Equal(QQN::NarroSuggestion()->LanguageId, $this->lstLanguage->SelectedValue), QQ::Like(QQN::NarroSuggestion()->Text->TextValue, '%' . $this->txtSearch->Text . '%'));
}
$this->dtgSuggestion->Refresh();
}