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


PHP eqLogic::byObjectId方法代码示例

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


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

示例1: Exception

<?php

if (!hasRight('displayview', true)) {
    throw new Exception('{{401 - Accès non autorisé}}');
}
$nbEqlogic = 0;
$nbCmd = 0;
$objects = object::all();
$eqLogics = array();
$cmds = array();
$eqLogics[-1] = eqLogic::byObjectId(null, false);
foreach ($eqLogics[-1] as $eqLogic) {
    $cmds[$eqLogic->getId()] = $eqLogic->getCmd();
    $nbCmd += count($cmds[$eqLogic->getId()]);
}
$nbEqlogic += count($eqLogics[-1]);
foreach ($objects as $object) {
    $eqLogics[$object->getId()] = $object->getEqLogic(false, false);
    foreach ($eqLogics[$object->getId()] as $eqLogic) {
        $cmds[$eqLogic->getId()] = $eqLogic->getCmd();
        $nbCmd += count($cmds[$eqLogic->getId()]);
    }
    $nbEqlogic += count($eqLogics[$object->getId()]);
}
?>
<style>
	.eqLogicSortable{
		list-style-type: none;
		min-height: 20px;
		padding-left: 0px;
	}
开发者ID:saez0pub,项目名称:core,代码行数:31,代码来源:display.php

示例2: init

     $info_eqLogic['id'] = $eqLogic->getId();
     $info_eqLogic['type'] = $eqLogic->getEqType_name();
     $info_eqLogic['object_id'] = $eqLogic->getObject_id();
     $info_eqLogic['html'] = $eqLogic->toHtml(init('version'));
     ajax::success($info_eqLogic);
 }
 if (init('action') == 'listByType') {
     ajax::success(utils::a2o(eqLogic::byType(init('type'))));
 }
 if (init('action') == 'listByObjectAndCmdType') {
     $object_id = init('object_id') != -1 ? init('object_id') : null;
     ajax::success(eqLogic::listByObjectAndCmdType($object_id, init('typeCmd'), init('subTypeCmd')));
 }
 if (init('action') == 'listByObject') {
     $object_id = init('object_id') != -1 ? init('object_id') : null;
     ajax::success(utils::o2a(eqLogic::byObjectId($object_id, init('onlyEnable', true), init('onlyVisible', false), init('eqType_name', null), init('logicalId', null), init('orderByName', false))));
 }
 if (init('action') == 'listByTypeAndCmdType') {
     $results = eqLogic::listByTypeAndCmdType(init('type'), init('typeCmd'), init('subTypeCmd'));
     $return = array();
     foreach ($results as $result) {
         $eqLogic = eqLogic::byId($result['id']);
         $info['eqLogic'] = utils::o2a($eqLogic);
         $info['object'] = array('name' => 'Aucun');
         if (is_object($eqLogic)) {
             $object = $eqLogic->getObject();
             if (is_object($object)) {
                 $info['object'] = utils::o2a($eqLogic->getObject());
             }
         }
         $return[] = $info;
开发者ID:saez0pub,项目名称:core,代码行数:31,代码来源:eqLogic.ajax.php

示例3: Exception

     $dataStore->setType($params['type']);
     $dataStore->setKey($params['key']);
     $dataStore->setValue($params['value']);
     $dataStore->setLink_id($params['linkId']);
     $dataStore->save();
     $jsonrpc->makeSuccess('ok');
 }
 /*             * ************************Equipement*************************** */
 if ($jsonrpc->getMethod() == 'eqLogic::all') {
     $jsonrpc->makeSuccess(utils::o2a(eqLogic::all()));
 }
 if ($jsonrpc->getMethod() == 'eqLogic::byType') {
     $jsonrpc->makeSuccess(utils::o2a(eqLogic::byType($params['type'])));
 }
 if ($jsonrpc->getMethod() == 'eqLogic::byObjectId') {
     $jsonrpc->makeSuccess(utils::o2a(eqLogic::byObjectId($params['object_id'])));
 }
 if ($jsonrpc->getMethod() == 'eqLogic::byId') {
     $eqLogic = eqLogic::byId($params['id']);
     if (!is_object($eqLogic)) {
         throw new Exception('EqLogic introuvable : ' . $params['id'], -32602);
     }
     $jsonrpc->makeSuccess(utils::o2a($eqLogic));
 }
 if ($jsonrpc->getMethod() == 'eqLogic::fullById') {
     $eqLogic = eqLogic::byId($params['id']);
     if (!is_object($eqLogic)) {
         throw new Exception('EqLogic introuvable : ' . $params['id'], -32602);
     }
     $return = utils::o2a($eqLogic);
     $return['cmds'] = array();
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:jeeApi.php

示例4: getEqLogic

 public function getEqLogic($_onlyEnable = true, $_onlyVisible = false, $_eqType_name = null, $_logicalId = null)
 {
     return eqLogic::byObjectId($this->getId(), $_onlyEnable, $_onlyVisible, $_eqType_name, $_logicalId);
 }
开发者ID:GaelGRIFFON,项目名称:core,代码行数:4,代码来源:object.class.php


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