當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Editor::table方法代碼示例

本文整理匯總了PHP中DataTables\Editor::table方法的典型用法代碼示例。如果您正苦於以下問題:PHP Editor::table方法的具體用法?PHP Editor::table怎麽用?PHP Editor::table使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataTables\Editor的用法示例。


在下文中一共展示了Editor::table方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _prep

 /**
  * Prepare the instance to be run.
  *
  * @param  Editor $editor Editor instance
  * @private
  */
 private function _prep($editor)
 {
     $links = $this->_links;
     // Were links used to configure this instance - if so, we need to
     // back them onto the join array
     if ($this->_join['parent'] === null && count($links)) {
         $editorTable = $editor->table();
         $editorTable = $editorTable[0];
         $joinTable = $this->table();
         if ($this->_aliasParentTable) {
             $editorTable = $this->_aliasParentTable;
         }
         if (count($links) === 2) {
             // No link table
             $f1 = explode('.', $links[0]);
             $f2 = explode('.', $links[1]);
             $this->_join['parent'] = $f1[1];
             $this->_join['child'] = $f2[1];
         } else {
             // Link table
             $f1 = explode('.', $links[0]);
             $f2 = explode('.', $links[1]);
             $f3 = explode('.', $links[2]);
             $f4 = explode('.', $links[3]);
             // Discover the name of the link table
             if ($f1[0] !== $editorTable && $f1[0] !== $joinTable) {
                 $this->_join['table'] = $f1[0];
             } else {
                 if ($f2[0] !== $editorTable && $f2[0] !== $joinTable) {
                     $this->_join['table'] = $f2[0];
                 } else {
                     if ($f3[0] !== $editorTable && $f3[0] !== $joinTable) {
                         $this->_join['table'] = $f3[0];
                     } else {
                         $this->_join['table'] = $f2[0];
                     }
                 }
             }
             $this->_join['parent'] = array($f1[1], $f2[1]);
             $this->_join['child'] = array($f3[1], $f4[1]);
         }
     }
 }
開發者ID:FaTTeST,項目名稱:billenv,代碼行數:49,代碼來源:Join.php

示例2: dbCleanExec

 /**
  * Clean the database
  * @param  \DataTables\Editor $editor Calling Editor instance
  * @param  Field $field   Host field
  * @internal
  */
 public function dbCleanExec($editor, $field)
 {
     // Database and file system clean up BEFORE adding the new file to
     // the db, otherwise it will be removed immediately
     $tables = $editor->table();
     $this->_dbClean($editor->db(), $tables[0], $field->dbField());
 }
開發者ID:kienbk1910,項目名稱:RDCAdmin,代碼行數:13,代碼來源:Upload.php


注:本文中的DataTables\Editor::table方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。