本文整理汇总了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;
}
示例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;
示例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();
示例4: getEqLogic
public function getEqLogic($_onlyEnable = true, $_onlyVisible = false, $_eqType_name = null, $_logicalId = null)
{
return eqLogic::byObjectId($this->getId(), $_onlyEnable, $_onlyVisible, $_eqType_name, $_logicalId);
}