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


PHP QQN::Attachment方法代码示例

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


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

示例1: __construct

 public function __construct($objParentObject, $strSetEditPanelMethod, $strCloseEditPanelMethod, $strControlId = null)
 {
     // Call the Parent
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Record Method Callbacks
     $this->strSetEditPanelMethod = $strSetEditPanelMethod;
     $this->strCloseEditPanelMethod = $strCloseEditPanelMethod;
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_CONTROL->ParentControl->dtgAttachment_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colAttachmentId = new QDataGridColumn(QApplication::Translate('Attachment Id'), '<?= $_ITEM->AttachmentId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->AttachmentId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->AttachmentId, false)));
     $this->colEntityQtypeId = new QDataGridColumn(QApplication::Translate('Entity Qtype'), '<?= $_CONTROL->ParentControl->dtgAttachment_EntityQtypeId_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityQtypeId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityQtypeId, false)));
     $this->colEntityId = new QDataGridColumn(QApplication::Translate('Entity Id'), '<?= $_ITEM->EntityId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityId, false)));
     $this->colFilename = new QDataGridColumn(QApplication::Translate('Filename'), '<?= QString::Truncate($_ITEM->Filename, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->Filename), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->Filename, false)));
     $this->colTmpFilename = new QDataGridColumn(QApplication::Translate('Tmp Filename'), '<?= QString::Truncate($_ITEM->TmpFilename, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->TmpFilename), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->TmpFilename, false)));
     $this->colFileType = new QDataGridColumn(QApplication::Translate('File Type'), '<?= QString::Truncate($_ITEM->FileType, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->FileType), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->FileType, false)));
     $this->colPath = new QDataGridColumn(QApplication::Translate('Path'), '<?= QString::Truncate($_ITEM->Path, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->Path), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->Path, false)));
     $this->colSize = new QDataGridColumn(QApplication::Translate('Size'), '<?= $_ITEM->Size; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->Size), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->Size, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_CONTROL->ParentControl->dtgAttachment_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_CONTROL->ParentControl->dtgAttachment_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->CreationDate, false)));
     // Setup DataGrid
     $this->dtgAttachment = new QDataGrid($this);
     $this->dtgAttachment->CellSpacing = 0;
     $this->dtgAttachment->CellPadding = 4;
     $this->dtgAttachment->BorderStyle = QBorderStyle::Solid;
     $this->dtgAttachment->BorderWidth = 1;
     $this->dtgAttachment->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgAttachment->Paginator = new QPaginator($this->dtgAttachment);
     $this->dtgAttachment->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgAttachment->UseAjax = true;
     // Specify the local databind method this datagrid will use
     $this->dtgAttachment->SetDataBinder('dtgAttachment_Bind', $this);
     $this->dtgAttachment->AddColumn($this->colEditLinkColumn);
     $this->dtgAttachment->AddColumn($this->colAttachmentId);
     $this->dtgAttachment->AddColumn($this->colEntityQtypeId);
     $this->dtgAttachment->AddColumn($this->colEntityId);
     $this->dtgAttachment->AddColumn($this->colFilename);
     $this->dtgAttachment->AddColumn($this->colTmpFilename);
     $this->dtgAttachment->AddColumn($this->colFileType);
     $this->dtgAttachment->AddColumn($this->colPath);
     $this->dtgAttachment->AddColumn($this->colSize);
     $this->dtgAttachment->AddColumn($this->colCreatedBy);
     $this->dtgAttachment->AddColumn($this->colCreationDate);
     // Setup the Create New button
     $this->btnCreateNew = new QButton($this);
     $this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('Attachment');
     $this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:55,代码来源:AttachmentListPanelBase.class.php

示例2: Form_Create

 protected function Form_Create()
 {
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgAttachment_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colAttachmentId = new QDataGridColumn(QApplication::Translate('Attachment Id'), '<?= $_ITEM->AttachmentId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->AttachmentId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->AttachmentId, false)));
     $this->colEntityQtypeId = new QDataGridColumn(QApplication::Translate('Entity Qtype'), '<?= $_FORM->dtgAttachment_EntityQtypeId_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityQtypeId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityQtypeId, false)));
     $this->colEntityId = new QDataGridColumn(QApplication::Translate('Entity Id'), '<?= $_ITEM->EntityId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->EntityId, false)));
     $this->colFilename = new QDataGridColumn(QApplication::Translate('Filename'), '<?= QString::Truncate($_ITEM->Filename, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->Filename), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->Filename, false)));
     $this->colTmpFilename = new QDataGridColumn(QApplication::Translate('Tmp Filename'), '<?= QString::Truncate($_ITEM->TmpFilename, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->TmpFilename), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->TmpFilename, false)));
     $this->colFileType = new QDataGridColumn(QApplication::Translate('File Type'), '<?= QString::Truncate($_ITEM->FileType, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->FileType), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->FileType, false)));
     $this->colPath = new QDataGridColumn(QApplication::Translate('Path'), '<?= QString::Truncate($_ITEM->Path, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->Path), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->Path, false)));
     $this->colSize = new QDataGridColumn(QApplication::Translate('Size'), '<?= $_ITEM->Size; ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->Size), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->Size, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_FORM->dtgAttachment_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_FORM->dtgAttachment_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::Attachment()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Attachment()->CreationDate, false)));
     // Setup DataGrid
     $this->dtgAttachment = new QDataGrid($this);
     $this->dtgAttachment->CellSpacing = 0;
     $this->dtgAttachment->CellPadding = 4;
     $this->dtgAttachment->BorderStyle = QBorderStyle::Solid;
     $this->dtgAttachment->BorderWidth = 1;
     $this->dtgAttachment->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgAttachment->Paginator = new QPaginator($this->dtgAttachment);
     $this->dtgAttachment->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgAttachment->UseAjax = false;
     // Specify the local databind method this datagrid will use
     $this->dtgAttachment->SetDataBinder('dtgAttachment_Bind');
     $this->dtgAttachment->AddColumn($this->colEditLinkColumn);
     $this->dtgAttachment->AddColumn($this->colAttachmentId);
     $this->dtgAttachment->AddColumn($this->colEntityQtypeId);
     $this->dtgAttachment->AddColumn($this->colEntityId);
     $this->dtgAttachment->AddColumn($this->colFilename);
     $this->dtgAttachment->AddColumn($this->colTmpFilename);
     $this->dtgAttachment->AddColumn($this->colFileType);
     $this->dtgAttachment->AddColumn($this->colPath);
     $this->dtgAttachment->AddColumn($this->colSize);
     $this->dtgAttachment->AddColumn($this->colCreatedBy);
     $this->dtgAttachment->AddColumn($this->colCreationDate);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:41,代码来源:AttachmentListFormBase.class.php

示例3: CountByCreatedBy

 /**
  * Count Attachments
  * by CreatedBy Index(es)
  * @param integer $intCreatedBy
  * @return int
  */
 public static function CountByCreatedBy($intCreatedBy)
 {
     // Call Attachment::QueryCount to perform the CountByCreatedBy query
     return Attachment::QueryCount(QQ::Equal(QQN::Attachment()->CreatedBy, $intCreatedBy));
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:11,代码来源:AttachmentGen.class.php

示例4: LoadArrayByEntityQtypeIdEntityId

 public static function LoadArrayByEntityQtypeIdEntityId($intEntityQtypeId, $intEntityId, $objOptionalClauses = null)
 {
     return Attachment::QueryArray(QQ::AndCondition(QQ::Equal(QQN::Attachment()->EntityQtypeId, $intEntityQtypeId), QQ::Equal(QQN::Attachment()->EntityId, $intEntityId)), $objOptionalClauses);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:4,代码来源:Attachment.class.php

示例5: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a Attachment-based QQNode.
  * It will also verify that it is a proper Attachment-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'attachment') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "attachment".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'AttachmentId':
                     return QQN::Attachment()->AttachmentId;
                 case 'EntityQtypeId':
                     return QQN::Attachment()->EntityQtypeId;
                 case 'EntityId':
                     return QQN::Attachment()->EntityId;
                 case 'Filename':
                     return QQN::Attachment()->Filename;
                 case 'TmpFilename':
                     return QQN::Attachment()->TmpFilename;
                 case 'FileType':
                     return QQN::Attachment()->FileType;
                 case 'Path':
                     return QQN::Attachment()->Path;
                 case 'Size':
                     return QQN::Attachment()->Size;
                 case 'CreatedBy':
                     return QQN::Attachment()->CreatedBy;
                 case 'CreatedByObject':
                     return QQN::Attachment()->CreatedByObject;
                 case 'CreationDate':
                     return QQN::Attachment()->CreationDate;
                 default:
                     throw new QCallerException('Simple Property not found in AttachmentDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:69,代码来源:AttachmentDataGridGen.class.php

示例6: CountByCreatedBy

 /**
  * Count Attachments
  * by CreatedBy Index(es)
  * @param integer $intCreatedBy
  * @return int
  */
 public static function CountByCreatedBy($intCreatedBy, $objOptionalClauses = null)
 {
     // Call Attachment::QueryCount to perform the CountByCreatedBy query
     return Attachment::QueryCount(QQ::Equal(QQN::Attachment()->CreatedBy, $intCreatedBy), $objOptionalClauses);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:11,代码来源:AttachmentGen.class.php


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