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


PHP DataObject::getAll方法代码示例

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


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

示例1: getRefByType

 function getRefByType($type)
 {
     $select = parent::getAll(null, false);
     $select->where('R_TypeRef = ?', $type);
     $result = $this->_db->fetchAll($select);
     return $result;
 }
开发者ID:anunay,项目名称:stentors,代码行数:7,代码来源:ReferencesObject.php

示例2: usedBy

 public static function usedBy($search_data = null, &$errors = array(), $defaults = null, $params = array())
 {
     $search = new SelectorItemSearch($defaults);
     $search->addSearchField('target_id', 'Target', 'hidden', '', 'hidden');
     // Search by Product
     $config = SelectorCollection::getTypeDetails($params['type']);
     $search->addSearchField('parent_id', implode('/', $config['itemFields']), 'treesearch', -1, 'basic');
     if (empty($search_data)) {
         $search_data = null;
     }
     $search->setSearchData($search_data, $errors, 'selectProduct');
     // Populate the parent_id field using the last selected value
     // it will be -1 if no previous selected value
     $parent_id = $search->getValue('parent_id');
     $cc = new ConstraintChain();
     if ($parent_id != '-1') {
         $cc->add(new Constraint('parent_id', '=', $parent_id));
     } else {
         $cc->add(new Constraint('parent_id', 'IS', 'NULL'));
     }
     $model = new DataObject('so_product_selector');
     $options = array($parent_id => 'Select an option');
     $options += $model->getAll($cc);
     $search->setOptions('parent_id', $options);
     if ($parent_id != '-1') {
         $data = array('target_id' => $search->getValue('target_id'));
         $search->setBreadcrumbs('parent_id', $model, 'parent_id', $parent_id, 'name', 'description', $data);
     }
     return $search;
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:30,代码来源:SelectorItemSearch.php

示例3: getAllByType

 /**
  * Fetches data of the files to import and filter according to the file type
  *
  * @param int    $langId Language id
  * @param string $type   Value defining the section where files are used.
  *
  * @return array
  */
 public function getAllByType($langId, $type = null)
 {
     $select = parent::getAll($langId, false);
     if (!is_null($type)) {
         $select->where('FI_Type = ?', $type);
     }
     return $select;
 }
开发者ID:anunay,项目名称:stentors,代码行数:16,代码来源:ImportExportObject.php

示例4: getData

 public function getData($langId = null, $bannerId = null)
 {
     $select = parent::getAll($langId, false);
     $select->order('IF_ImgID ASC');
     if ($bannerId) {
         $select->where('IF_DataID = ?', $bannerId);
     }
     $data = $this->_db->fetchAll($select);
     return $data;
 }
开发者ID:anunay,项目名称:stentors,代码行数:10,代码来源:BannerFeaturedImageObject.php

示例5: getVideosList

 public function getVideosList()
 {
     $select = parent::getAll(null, false);
     $select->where('VI_LanguageID = ?', Cible_Controller_Action::getDefaultEditLanguage());
     $select->order('V_Alias ASC');
     //echo $select;
     //  exit;
     $data = $this->_db->fetchAll($select);
     return $data;
 }
开发者ID:anunay,项目名称:stentors,代码行数:10,代码来源:VideoObject.php

示例6: getData

 public function getData($langId = null, $bannerId = null)
 {
     $select = parent::getAll($langId, false);
     $select->order('IF_ImgID ASC');
     $select->join('Videos', 'Videos.V_ID = IFI_Video');
     $select->join('VideosIndex', 'Videos.V_ID = VideosIndex.VI_ID');
     $select->where('VI_LanguageID = ?', $langId);
     if ($bannerId) {
         $select->where('IF_DataID = ?', $bannerId);
     }
     // echo $select;
     $data = $this->_db->fetchAll($select);
     return $data;
 }
开发者ID:anunay,项目名称:stentors,代码行数:14,代码来源:BannerFeaturedImageObject.php

示例7: selectProduct

 public static function selectProduct($search_data = null, &$errors = array(), $defaults = null)
 {
     $search = new sordersSearch($defaults);
     // Search by Customer
     $customer = DataObjectFactory::Factory('SLCustomer');
     $customers = $customer->getAll(null, false, true, '', '');
     $options = array('NULL' => 'None');
     $options += $customers;
     if (!isset($search->defaults['slmaster_id'])) {
         $search->defaults['slmaster_id'] = key($options);
     }
     $search->addSearchField('slmaster_id', 'Customer', 'select', $search->defaults['slmaster_id'], 'basic');
     $search->setOptions('slmaster_id', $options);
     // Search by Product Group
     $prod_group = DataObjectFactory::Factory('STProductgroup');
     $prod_group_list = $prod_group->getAll();
     $search->addSearchField('prod_group_id', 'Product Group', 'select', '', 'basic');
     $options = array('' => 'None');
     $options += $prod_group_list;
     $search->setOptions('prod_group_id', $options);
     // Search by Description
     $search->addSearchField('description', 'description contains', 'contains', '', 'basic');
     // Search by Product
     $config = SelectorCollection::getTypeDetails('sales_order');
     $search->addSearchField('parent_id', implode('/', $config['itemFields']), 'treesearch', -1, 'basic');
     if (empty($search_data)) {
         $search_data = null;
     }
     $search->setSearchData($search_data, $errors, 'selectProduct');
     // Populate the parent_id field using the last selected value
     // it will be -1 if no previous selected value
     $parent_id = $search->getValue('parent_id');
     $cc = new ConstraintChain();
     if ($parent_id != '-1') {
         $cc->add(new Constraint('parent_id', '=', $parent_id));
     } else {
         $cc->add(new Constraint('parent_id', 'IS', 'NULL'));
     }
     $model = new DataObject('so_product_selector');
     $options = array($parent_id => 'Select an option');
     $options += $model->getAll($cc);
     $search->setOptions('parent_id', $options);
     if ($parent_id != '-1') {
         $data = array('slmaster_id' => $search->getValue('slmaster_id'));
         $search->setBreadcrumbs('parent_id', $model, 'parent_id', $parent_id, 'name', 'description', $data);
     }
     return $search;
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:48,代码来源:sordersSearch.php

示例8: getAll

 function getAll(ConstraintChain $cc = null, $ignore_tree = FALSE, $use_collection = FALSE, $limit = '')
 {
     return parent::getAll($cc, $ignore_tree, TRUE, $limit);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:4,代码来源:Address.php

示例9: getAll

 public function getAll(ConstraintChain $cc = null, $ignore_tree = false, $use_collection = false, $limit = '')
 {
     return parent::getAll($cc, $ignore_tree, true, $limit);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:4,代码来源:Employee.php

示例10: autocompleteSearch

 /**
  * Set filters for search by keywords.
  *
  * @param Zend_Db_Select $select The begining of the query to complete.
  *
  * @return void
  */
 public function autocompleteSearch($value, $langId = 1)
 {
     $select = parent::getAll($langId, false);
     //        $select->where('P_Type = ?', 'catalog');
     $this->keywordExist(array($value), $select, $langId);
     $products = $this->_db->fetchAll($select);
     return $products;
 }
开发者ID:anunay,项目名称:stentors,代码行数:15,代码来源:ProductsObject.php

示例11: DataObject

// | checknum    | varchar(25)  |      |     |            |                |
// +-------------+--------------+------+-----+------------+----------------+
// mysql> desc expense_import;
// +------------------+--------------+------+-----+------------+----------------+
// | Field            | Type         | Null | Key | Default    | Extra          |
// +------------------+--------------+------+-----+------------+----------------+
// | idexpense_import | int(10)      |      | PRI | NULL       | auto_increment |
// | category         | varchar(60)  |      |     |            |                |
// | debit_date       | date         |      |     | 0000-00-00 |                |
// | description      | varchar(250) |      |     |            |                |
// | payment_method   | varchar(60)  |      |     |            |                |
// | amount           | float(10,2)  |      |     | 0.00       |                |
// +------------------+--------------+------+-----+------------+----------------+
$do_import_expense = new DataObject($this->getDbCon());
$do_import_expense->setTable("expense_import");
$do_import_expense->getAll();
$do_expense = new DataObject($this->getDbCon());
$do_expense->setTable("expense");
while ($do_import_expense->next()) {
    $category = 0;
    $suplier = 0;
    if ($do_import_expense->category == "Airlines / Transportation") {
        $category = 10;
    }
    if ($do_import_expense->category == "ATM Withdrawals") {
        $category = 46;
    }
    if ($do_import_expense->category == "Auto / Gas") {
        $category = 8;
    }
    if ($do_import_expense->category == "Building Supply / Wholesale") {
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:accounting.load_expenses.inc.php

示例12: copyItems

 static function copyItems($_data = '', &$errors = array())
 {
     if (empty($_data['tablename'])) {
         $errors[] = 'No table name provided';
     }
     if (empty($_data['from_item_id'])) {
         $errors[] = 'From item not provided';
     }
     if (empty($_data['to_item_id'])) {
         $errors[] = 'To item not provided';
     }
     if (count($errors) > 0) {
         return false;
     }
     $do = new DataObject($_data['tablename']);
     $do->identifierField = 'target_id';
     $cc = new ConstraintChain();
     $cc->add(new Constraint('item_id', '=', $_data['from_item_id']));
     $copyitems = $do->getAll($cc);
     foreach ($copyitems as $target_id) {
         $link_data[] = array('item_id' => $_data['to_item_id'], 'target_id' => $target_id);
     }
     return self::saveAssociations($link_data, $_data['tablename'], $errors);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:24,代码来源:SelectorCollection.php

示例13: getAll

 public function getAll(ConstraintChain $cc = null, $ignore_tree = false, $use_collection = true, $limit = '', $active = true)
 {
     if (!$cc instanceof ConstraintChain) {
         $cc = new ConstraintChain();
     }
     if ($active === TRUE) {
         $cc->add(new Constraint('date_inactive', 'IS', 'NULL'));
     } elseif ($active === FALSE) {
         $cc->add(new Constraint('date_inactive', 'IS NOT', 'NULL'));
     }
     return parent::getAll($cc, $ignore_tree, TRUE, $limit);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:12,代码来源:SLCustomer.php

示例14: getAll

 /**
  * @see DataObject::getAll()
  *
  * @param type $langId
  * @param type $array
  * @param type $id
  *
  * @return Zend_Db_Select
  */
 public function getAll($langId = null, $array = true, $id = null)
 {
     $select = parent::getAll($langId, $array, $id);
     if ($select instanceof Zend_Db_Select && $this->_moduleId > 0) {
         $select->where('L_ModuleID = ?', $this->_moduleId);
     }
     return $select;
 }
开发者ID:anunay,项目名称:stentors,代码行数:17,代码来源:LogObject.php

示例15: print_component_list

 public function print_component_list($status = 'generate')
 {
     // build options array
     $options = array('type' => array('pdf' => '', 'xml' => ''), 'output' => array('print' => '', 'save' => '', 'email' => '', 'view' => ''), 'filename' => 'Component_list_' . fix_date(date(DATE_FORMAT)), 'report' => 'selector_components');
     // simply return the options if we're only at the dialog stage
     if (strtolower($status) === "dialog") {
         return $options;
     }
     $errors = array();
     $messages = array();
     if (!isset($this->_data) || !$this->loadData()) {
         // we are viewing data, but either no id has been provided
         // or the data for the supplied id does not exist
         $this->dataError();
         sendBack();
     }
     $current = $this->_uses[$this->modeltype];
     $parent = $this->getHierarchy($current->parent_id, $current->description);
     $title_template = '<fo:table-row>' . "\r\n";
     $title_template .= '	<fo:table-cell padding="1mm" width="%s" text-align="%s">' . "\r\n";
     $title_template .= '    	<fo:block >%s</fo:block>' . "\r\n";
     $title_template .= '	</fo:table-cell>' . "\r\n";
     $title_template .= '	<fo:table-cell padding="1mm" text-align="%s" >' . "\r\n";
     $title_template .= '    	<fo:block font-weight="bold">%s</fo:block>' . "\r\n";
     $title_template .= '	</fo:table-cell>' . "\r\n";
     $title_template .= '</fo:table-row>' . "\r\n";
     // load the model
     $link = new DataObject($this->linkTableName);
     $link->idField = $link->identifierField = 'target_id';
     $cc = new ConstraintChain();
     $cc->add(new Constraint('item_id', '=', $current->id));
     $selected_ids = $link->getAll($cc);
     $selectorobjects = $this->getComponents($selected_ids);
     $width = strlen($current->description);
     foreach ($parent as $item_detail) {
         $width = strlen($item_detail['description']) > $width ? strlen($item_detail['description']) : $width;
     }
     $item_list = '';
     foreach (array_reverse($parent) as $item_detail) {
         $item_list .= sprintf($title_template, $width * 2 . 'mm', 'left', prettify($item_detail['description']), 'left', $item_detail['name']);
     }
     $item_list .= sprintf($title_template, $width * 2 . 'mm', 'left', prettify($current->description), 'left', $current->name);
     $headings = $selectorobjects->getheadings();
     $targetHeadings = array();
     foreach ($this->targetFields as $key => $field) {
         if (isset($headings[$field])) {
             $targetHeadings[$field] = $headings[$field];
         }
     }
     $report_title = 'List of Component ' . (empty($title) ? prettify($this->getPageName('', '')) : 'items') . ' for Item, Printed on ' . date(DATE_TIME_FORMAT);
     // build the custom XSL
     $xsl = $this->build_custom_xsl($selectorobjects, 'selector_components', $report_title, $targetHeadings, '', array());
     if ($xsl === FALSE) {
         return FALSE;
     }
     $xsl = $this->process_xsl($xsl, array('ITEM_LIST' => $item_list));
     $options['xslSource'] = $xsl;
     $options['xmlSource'] = $this->generate_xml(array('model' => $selectorobjects, 'extra' => $extra, 'load_relationships' => FALSE));
     // execute the print output function, echo the returned json for jquery
     echo $this->generate_output($this->_data['print'], $options);
     exit;
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:62,代码来源:SelectorController.php


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