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


PHP CommonDBChild::prepareInputForAdd方法代碼示例

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


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

示例1: prepareInputForAdd

 /**
  * @since version 0.84
  **/
 function prepareInputForAdd($input)
 {
     if (!isset($input['field']) || empty($input['field'])) {
         return false;
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:10,代碼來源:ruleaction.class.php

示例2: prepareInputForAdd

 /**
  * @see CommonDBChild::prepareInputForAdd()
  **/
 function prepareInputForAdd($input)
 {
     if (empty($input['end_date']) || $input['end_date'] == 'NULL' || $input['end_date'] < $input['begin_date']) {
         $input['end_date'] = $input['begin_date'];
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:10,代碼來源:contractcost.class.php

示例3: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     // Check override of segment : do not add
     if (count(self::getSegmentsBetween($input['calendars_id'], $input['day'], $input['begin'], $input['day'], $input['end'])) > 0) {
         Session::addMessageAfterRedirect(__('Can not add a range riding an existing period'), false, ERROR);
         return false;
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:kipman,項目名稱:glpi,代碼行數:9,代碼來源:calendarsegment.class.php

示例4: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     // Use massiveaction system to manage add system.
     // Need to update data : value not set but
     if (!isset($input['value'])) {
         if (isset($input['field']) && isset($input[$input['field']])) {
             $input['value'] = $input[$input['field']];
             unset($input[$input['field']]);
             unset($input['field']);
         }
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:13,代碼來源:tickettemplatepredefinedfield.class.php

示例5: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     if (isset($input["logical_number"]) && strlen($input["logical_number"]) == 0) {
         unset($input["logical_number"]);
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:7,代碼來源:networkport.class.php

示例6: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     //       if ($job->fields["status"] == CommonITILObject::SOLVED
     //                  || $job->fields["status"] == CommonITILObject::CLOSED) {
     //            return false;
     //         }
     $input["users_id"] = 0;
     // Only set requester on manual action
     if (!isset($input['_auto_import']) && !isset($input['_auto_update']) && !Session::isCron()) {
         $input["users_id"] = Session::getLoginUserID();
     }
     $input["submission_date"] = $_SESSION["glpi_currenttime"];
     $input["status"] = 'waiting';
     return parent::prepareInputForAdd($input);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:15,代碼來源:ticketvalidation.class.php

示例7: prepareInputForAdd

 /**
  * @see CommonDBChild::prepareInputForAdd()
  **/
 function prepareInputForAdd($input)
 {
     global $CFG_GLPI;
     if (!$this->getFromDBforDevice($input['itemtype'], $input['items_id'])) {
         if ($item = static::getItemFromArray(static::$itemtype, static::$items_id, $input)) {
             $input['alert'] = Entity::getUsedConfig('default_infocom_alert', $item->getEntityID());
             return parent::prepareInputForAdd($input);
         }
     }
     return false;
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:14,代碼來源:infocom.class.php

示例8: prepareInputForAdd

 /**
  * @see CommonDBChild::prepareInputForAdd()
  **/
 function prepareInputForAdd($input)
 {
     return parent::prepareInputForAdd($this->prepareInput($input));
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:7,代碼來源:ipaddress.class.php

示例9: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     return parent::prepareInputForAdd(self::cleanContentHtml($input));
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:4,代碼來源:notificationtemplatetranslation.class.php

示例10: prepareInputForAdd

 /**
  * @see CommonDBChild::prepareInputForAdd()
  **/
 function prepareInputForAdd($input)
 {
     // Error on previous added reservation on several add
     if (isset($input['_ok']) && !$input['_ok']) {
         return false;
     }
     // set new date.
     $this->fields["reservationitems_id"] = $input["reservationitems_id"];
     $this->fields["begin"] = $input["begin"];
     $this->fields["end"] = $input["end"];
     if (!$this->test_valid_date()) {
         $this->displayError("date", $input["reservationitems_id"]);
         return false;
     }
     if ($this->is_reserved()) {
         $this->displayError("is_res", $input["reservationitems_id"]);
         return false;
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:btry,項目名稱:glpi,代碼行數:23,代碼來源:reservation.class.php

示例11: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     // My preparation on $input
     return parent::prepareInputForAdd($input);
 }
開發者ID:pluginsGLPI,項目名稱:example,代碼行數:5,代碼來源:child.class.php

示例12: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     // Check email validity
     if (!isset($input['email']) || empty($input['email'])) {
         return false;
     }
     // First email is default
     if (countElementsInTable($this->getTable(), "`users_id` = '" . $input['users_id'] . "'") == 0) {
         $input['is_default'] = 1;
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:12,代碼來源:useremail.class.php

示例13: prepareInputForAdd

 function prepareInputForAdd($input)
 {
     $input["users_id"] = 0;
     // Only set requester on manual action
     if (!isset($input['_auto_import']) && !isset($input['_auto_update']) && !Session::isCron()) {
         $input["users_id"] = Session::getLoginUserID();
     }
     $input["submission_date"] = $_SESSION["glpi_currenttime"];
     $input["status"] = self::WAITING;
     if (!isset($input["users_id_validate"]) || $input["users_id_validate"] <= 0) {
         return false;
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:pvasener,項目名稱:glpi,代碼行數:14,代碼來源:commonitilvalidation.class.php

示例14: prepareInputForAdd

 /**
  * @see CommonDBTM::prepareInputForAdd
  */
 function prepareInputForAdd($input)
 {
     if (isset($input["logical_number"]) && strlen($input["logical_number"]) == 0) {
         unset($input["logical_number"]);
     }
     if (!isset($input["_no_history"])) {
         $input['_no_history'] = false;
     }
     if (isset($input['_create_children']) && $input['_create_children']) {
         $input = $this->splitInputForElements($input);
     }
     return parent::prepareInputForAdd($input);
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:16,代碼來源:networkport.class.php

示例15: prepareInputForAdd

 /**
  * @see CommonDBTM::prepareInputForAdd
  */
 function prepareInputForAdd($input)
 {
     if (isset($input["logical_number"]) && strlen($input["logical_number"]) == 0) {
         unset($input["logical_number"]);
     }
     $input = $this->splitInputForElements($input);
     return parent::prepareInputForAdd($input);
 }
開發者ID:btry,項目名稱:glpi,代碼行數:11,代碼來源:networkport.class.php


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