本文整理汇总了PHP中QQ::IsNull方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::IsNull方法的具体用法?PHP QQ::IsNull怎么用?PHP QQ::IsNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQ
的用法示例。
在下文中一共展示了QQ::IsNull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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());
}
}
示例2: dtgGroupRegistration_Bind
protected function dtgGroupRegistration_Bind()
{
$objConditions = QQ::All();
$objClauses = QQ::Clause($this->dtgGroupRegistrations->OrderByClause);
if (!$this->chkShowInactive->Checked) {
$objConditions = QQ::AndCondition($objConditions, QQ::OrCondition(QQ::Equal(QQN::GroupRegistrations()->ProcessedFlag, false), QQ::IsNull(QQN::GroupRegistrations()->ProcessedFlag)));
}
$this->dtgGroupRegistrations->DataSource = GroupRegistrations::QueryArray($objConditions, $objClauses);
}
示例3: dtgItems_Bind
public function dtgItems_Bind()
{
$intYear = QApplication::PathInfo(0);
$dttStart = new QDateTime($intYear . '-01-01');
$dttEnd = new QDateTime($dttStart);
$dttEnd->Year += 1;
$dttStart->SetTime(null, null, null);
$dttEnd->SetTime(null, null, null);
$this->dtgItems->DataSource = Person::QueryArray(QQ::AndCondition(QQ::GreaterOrEqual(QQN::Person()->StewardshipContribution->DateCredited, $dttStart), QQ::LessThan(QQN::Person()->StewardshipContribution->DateCredited, $dttEnd), QQ::IsNull(QQN::Person()->PrimaryAddressText), QQ::IsNull(QQN::Person()->StewardshipAddressId)), QQ::Clause(QQ::Distinct(), QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName)));
}
示例4: dtgMembers_Bind
public function dtgMembers_Bind()
{
$objCondition = QQ::In(QQN::Person()->GroupParticipation->GroupId, $this->intGroupIdArray);
$objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
$this->dtgMembers->TotalItemCount = Person::QueryCount($objCondition);
$objClauses = array(QQ::Distinct());
if ($objClause = $this->dtgMembers->LimitClause) {
$objClauses[] = $objClause;
}
if ($objClause = $this->dtgMembers->OrderByClause) {
$objClauses[] = $objClause;
}
$this->dtgMembers->DataSource = Person::QueryArray($objCondition, $objClauses);
}
示例5: RenderCount
public function RenderCount($objGroup)
{
// Count differently if it's a group Category or Growth Group
if ($objGroup->Type == GroupType::$NameArray[GroupType::GroupCategory]) {
// Setup Group Array
$objGroupArray = $objGroup->GetThisAndChildren();
$intGroupIdArray = array();
foreach ($objGroupArray as $objGroup) {
$intGroupIdArray[] = $objGroup->Id;
}
$objCondition = QQ::In(QQN::Person()->GroupParticipation->GroupId, $intGroupIdArray);
$objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
$strReturn = Person::QueryCount($objCondition);
return "<b>" . $strReturn . "</b>";
} else {
$objCondition = QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $objGroup->Id);
$objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
return Person::QueryCount($objCondition);
}
}
示例6: dtgGroups_Bind
public function dtgGroups_Bind()
{
if ($this->chkViewAll->Checked) {
$objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
} else {
$objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::IsNull(QQN::Group()->GroupParticipation->DateEnd), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
}
// Admins can view anything
if (QApplication::$Login->RoleTypeId == RoleType::ChMSAdministrator) {
} else {
// Non-Admins can only view non-confidential groups
// OR groups that they are associated with
$intMinistryIdArray = array();
foreach (QApplication::$Login->GetMinistryArray() as $objMinistry) {
$intMinistryIdArray[] = $objMinistry->Id;
}
$objSubClause = QQ::OrCondition(QQ::Equal(QQN::Group()->ConfidentialFlag, false), QQ::In(QQN::Group()->MinistryId, $intMinistryIdArray));
$objClause = QQ::AndCondition($objClause, $objSubClause);
}
$this->dtgGroups->DataSource = Group::QueryArray($objClause, QQ::Distinct());
}
示例7: dtgMembers_Bind
public function dtgMembers_Bind()
{
if ($this->chkViewAll->Checked) {
$objConditions = QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $this->objGroup->Id);
} else {
$objConditions = QQ::AndCondition(QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $this->objGroup->Id), QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
}
$this->dtgMembers->TotalItemCount = Person::QueryCount($objConditions);
if ($strName = trim($this->txtFirstName->Text)) {
$objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->FirstName, $strName . '%'));
}
if ($strName = trim($this->txtLastName->Text)) {
$objConditions = QQ::AndCondition($objConditions, QQ::Like(QQN::Person()->LastName, $strName . '%'));
}
$objClauses = array(QQ::Distinct());
if ($objClause = $this->dtgMembers->LimitClause) {
$objClauses[] = $objClause;
}
if ($objClause = $this->dtgMembers->OrderByClause) {
$objClauses[] = $objClause;
}
$this->dtgMembers->DataSource = Person::QueryArray($objConditions, $objClauses);
}
示例8:
<?php
QEmailServer::$SmtpServer = SMTP_SERVER;
QEmailServer::$SmtpPort = SMTP_PORT;
QEmailServer::$SmtpUsername = SMTP_USERNAME;
QEmailServer::$SmtpPassword = SMTP_PASSWORD;
QEmailServer::$AuthLogin = true;
$objEmailQueue = EmailQueue::QueryArray(QQ::IsNull(QQN::EmailQueue()->ErrorFlag), QQ::Clause(QQ::LimitInfo(50)));
foreach ($objEmailQueue as $objEmail) {
$objEmail->Send();
}
示例9: sprintf
$strCacheId = sprintf('rssfeed_text_%d_%d', $objProject->ProjectId, QApplication::QueryString('l'));
} else {
$strCacheId = sprintf('rssfeed_text_%d', QApplication::QueryString('l'));
}
if (!($objRssFeed = QApplication::$Cache->load($strCacheId))) {
if (isset($objProject) && $objProject instanceof NarroProject) {
$objRssFeed = new QRssFeed(sprintf(t('Texts to translate for %s'), $objProject->ProjectName), __HTTP_URL__ . __VIRTUAL_DIRECTORY__ . __SUBDIRECTORY__, sprintf(t('Get the latest texts to translate for the project %s'), $objProject->ProjectName));
} else {
$objRssFeed = new QRssFeed(t('Texts to translate'), __HTTP_URL__ . __VIRTUAL_DIRECTORY__ . __SUBDIRECTORY__, t('Get the latest texts to translate'));
}
if (isset($objProject) && $objProject instanceof NarroProject) {
$objProjectCondition = QQ::Equal(QQN::NarroContextInfo()->Context->ProjectId, $objProject->ProjectId);
} else {
$objProjectCondition = QQ::All();
}
$arrNarroContextInfo = NarroContextInfo::QueryArray(QQ::AndCondition(QQ::Equal(QQN::NarroContextInfo()->Context->Active, 1), $objProjectCondition, QQ::IsNull(QQN::NarroContextInfo()->ValidSuggestionId), QQ::Equal(QQN::NarroContextInfo()->LanguageId, QApplication::GetLanguageId())), array(QQ::OrderBy(QQN::NarroContextInfo()->Context->Text->Created, 0), QQ::OrderBy(QQN::NarroContextInfo()->Context->TextId, 1), QQ::OrderBy(QQN::NarroContextInfo()->Context->ProjectId, 1), QQ::LimitInfo(20, 0)));
$intOldTextId = 0;
$intOldProjectId = 0;
$strDescription = '';
foreach ($arrNarroContextInfo as $intKey => $objNarroContextInfo) {
$strContextLink = sprintf(__HTTP_URL__ . __VIRTUAL_DIRECTORY__ . __SUBDIRECTORY__ . '/' . NarroLink::Translate($objNarroContextInfo->Context->ProjectId, '', 0, '', 0, 0, 10, 0, $objNarroContextInfo->ContextInfoId));
if ($intOldTextId != $objNarroContextInfo->Context->TextId) {
if (isset($objItem)) {
$objItem->Description = $strDescription . '</ul><p>' . t('Click on any context to translate the text, on the file name or project name to see all the untranslated texts from that file or project.') . '</p>';
$objRssFeed->AddItem($objItem);
$strDescription = '';
$intOldProjectId = 0;
}
$objItem = new QRssItem(strlen($objNarroContextInfo->Context->Text->TextValue) > 124 ? substr($objNarroContextInfo->Context->Text->TextValue, 0, 124) . '...' : $objNarroContextInfo->Context->Text->TextValue, $strContextLink);
$objItem->PubDate = new QDateTime($objNarroContextInfo->Context->Text->Created);
if ($objNarroContextInfo->Context->Text->HasComments) {
示例10: dtgFile_SetConditions
public function dtgFile_SetConditions()
{
if ($this->txtSearch->Text == '') {
$objCommonCondition = QQ::AndCondition(QQ::Equal(QQN::NarroFileProgress()->File->Active, 1), QQ::Equal(QQN::NarroFileProgress()->LanguageId, QApplication::GetLanguageId()), QQ::Equal(QQN::NarroFileProgress()->File->ProjectId, $this->objProject->ProjectId));
} else {
$objCommonCondition = QQ::AndCondition(QQ::Equal(QQN::NarroFileProgress()->File->Active, 1), QQ::Equal(QQN::NarroFileProgress()->LanguageId, QApplication::GetLanguageId()), QQ::Equal(QQN::NarroFileProgress()->File->ProjectId, $this->objProject->ProjectId), QQ::Like(QQN::NarroFileProgress()->File->FileName, sprintf('%%%s%%', $this->txtSearch->Text)));
}
// Remember! We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
if (!$this->chkShowHierarchy->Checked) {
if ($this->chkShowFolders->Checked) {
$this->dtgFile->AdditionalConditions = $objCommonCondition;
} else {
$this->dtgFile->AdditionalConditions = QQ::AndCondition($objCommonCondition, QQ::NotEqual(QQN::NarroFileProgress()->File->TypeId, NarroFileType::Folder));
}
} elseif ($this->objParentFile) {
$objParentCondition = QQ::Equal(QQN::NarroFileProgress()->File->ParentId, $this->objParentFile->FileId);
if ($this->chkShowFolders->Checked) {
$this->dtgFile->AdditionalConditions = QQ::AndCondition($objCommonCondition, $objParentCondition);
} else {
$this->dtgFile->AdditionalConditions = QQ::AndCondition($objCommonCondition, $objParentCondition, QQ::NotEqual(QQN::NarroFileProgress()->File->TypeId, NarroFileType::Folder));
}
} else {
$objParentCondition = QQ::IsNull(QQN::NarroFileProgress()->File->ParentId);
if ($this->chkShowFolders->Checked) {
$this->dtgFile->AdditionalConditions = QQ::AndCondition($objCommonCondition, $objParentCondition);
} else {
$this->dtgFile->AdditionalConditions = QQ::AndCondition($objCommonCondition, $objParentCondition, QQ::NotEqual(QQN::NarroFileProgress()->File->TypeId, NarroFileType::Folder));
}
}
$this->MarkAsModified();
}
示例11: CountByFileName
public static function CountByFileName($strFileName, $intFilter, $objExtraCondition = null)
{
if (!is_object($objExtraCondition)) {
$objExtraCondition = QQ::All();
}
if (trim($strFileName) == '') {
$objSearchCondition = QQ::All();
} elseif (preg_match("/^'.*'\$/", $strFileName)) {
$objSearchCondition = QQ::Equal(QQN::NarroContextInfo()->Context->File->FileName, substr($strFileName, 1, -1));
} else {
$objSearchCondition = QQ::Like(QQN::NarroContextInfo()->Context->File->FileName, '%' . $strFileName . '%');
}
switch ($intFilter) {
case NarroTextListForm::SHOW_UNTRANSLATED_TEXTS:
$objFilterCondition = QQ::Equal(QQN::NarroContextInfo()->HasSuggestions, 0);
break;
case NarroTextListForm::SHOW_APPROVED_TEXTS:
$objFilterCondition = QQ::IsNotNull(QQN::NarroContextInfo()->ValidSuggestionId);
break;
case NarroTextListForm::SHOW_TEXTS_THAT_REQUIRE_APPROVAL:
$objFilterCondition = QQ::AndCondition(QQ::IsNull(QQN::NarroContextInfo()->ValidSuggestionId), QQ::Equal(QQN::NarroContextInfo()->HasSuggestions, 1));
break;
default:
// no filters
$objFilterCondition = QQ::All();
}
$intContextCount = NarroContextInfo::QueryCount(QQ::AndCondition($objSearchCondition, $objFilterCondition, $objExtraCondition), array(QQ::GroupBy(QQN::NarroContextInfo()->ContextId)));
return $intContextCount;
}
示例12: CalculateQqCondition
protected function CalculateQqCondition(QueryCondition $objQueryCondition, QQNode $objQqNode, QQCondition $objQqConditionToAdd = null)
{
// Get the comparison Query Operation we are using
$objOperation = $objQueryCondition->QueryOperation;
// Get the QQ Factory Name we are using -- this becomes the Qq Method Name we run to construct
// the QcodoQueryCondition
$strMethodName = $objOperation->QqFactoryName;
// Generate the QcodoQueryCondition
switch ($objQueryCondition->QueryNode->QueryDataTypeId) {
case QueryDataType::BooleanValue:
if ($objQueryCondition->Value) {
$objQqCondition = QQ::Equal($objQqNode, true);
} else {
$objQqCondition = QQ::OrCondition(QQ::Equal($objQqNode, false), QQ::IsNull($objQqNode));
}
break;
default:
if ($objOperation->ArgumentFlag) {
$strArgument = $objOperation->ArgumentPrepend . $objQueryCondition->Value . $objOperation->ArgumentPostpend;
$objQqCondition = QQ::$strMethodName($objQqNode, $strArgument);
} else {
$objQqCondition = QQ::$strMethodName($objQqNode);
}
break;
}
if ($objQqConditionToAdd) {
$objQqCondition = QQ::AndCondition($objQqConditionToAdd, $objQqCondition);
}
return $objQqCondition;
}
示例13: RenderCurrentGroups
public function RenderCurrentGroups(Person $objPerson)
{
$this->objParticipations = GroupParticipation::QueryArray(QQ::AndCondition(QQ::Equal(QQN::GroupParticipation()->PersonId, $objPerson->Id), QQ::IsNull(QQN::GroupParticipation()->DateEnd), QQ::In(QQN::GroupParticipation()->GroupId, $this->intGroupIdArray)), QQ::Clause(QQ::OrderBy(QQN::GroupParticipation()->Group->Name), QQ::Expand(QQN::GroupParticipation()->Group->Name)));
$strArray = array();
foreach ($this->objParticipations as $objParticipation) {
$strArray[] = $objParticipation->Group->Name;
}
if (count($strArray)) {
return implode(' and ', $strArray);
} else {
return '<span style="font-size: 10px; color: #999;">No current groups</span>';
}
}
示例14: GetActiveGroupParticipationArray
/**
* Gets all associated ACTIVE GroupParticipations as an array of GroupParticipation objects
* @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
* @return GroupParticipation[]
*/
public function GetActiveGroupParticipationArray($objOptionalClauses = null)
{
if (is_null($this->intId)) {
return array();
}
try {
return GroupParticipation::QueryArray(QQ::AndCondition(QQ::Equal(QQN::GroupParticipation()->GroupId, $this->intId), QQ::OrCondition(QQ::IsNull(QQN::GroupParticipation()->DateEnd), QQ::GreaterThan(QQN::GroupParticipation()->DateEnd, QDateTime::Now()))), $objOptionalClauses);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
示例15: dtgParentPagerIndividual_Bind
public function dtgParentPagerIndividual_Bind()
{
$objCondition = QQ::All();
if (strlen($strText = trim($this->txtServerIdentifier->Text))) {
$objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::ParentPagerIndividual()->ServerIdentifier, $strText));
}
if (strlen($strText = trim($this->txtFirstName->Text))) {
$objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::ParentPagerIndividual()->FirstName, $strText . '%'));
}
if (strlen($strText = trim($this->txtLastName->Text))) {
$objCondition = QQ::AndCondition($objCondition, QQ::Like(QQN::ParentPagerIndividual()->LastName, $strText . '%'));
}
if ($this->chkShowUnlinkedOnly->Checked) {
$objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::ParentPagerIndividual()->PersonId));
}
$this->dtgParentPagerIndividuals->MetaDataBinder($objCondition);
}