michaelbmuller/50001-ready-guidance-test
Composer 安装命令:
composer require michaelbmuller/50001-ready-guidance-test
包简介
50001 Ready Guidance
README 文档
README
This support library includes all of the USDOE 50001 Ready Navigator guidance broken into 25 individual tasks. The 50001 Ready Navigator provides step-by-step guidance for implementing and maintaining an energy management system in conformance with the ISO 50001 Energy Management System Standard.
Installation
With Composer
$ composer require michaelbmuller/50001-ready-guidance-test
{
"require": {
"michaelbmuller/50001-ready-guidance-test": "dev-master"
}
}
Loading Guidance
<?php require 'vendor/autoload.php'; use DOE_50001_Ready\Guidance; //Load guidance $guidance = new Guidance(); //Load alternate language (example: español) $guidance = new Guidance('es'); //Set Custom Task Tips $guidance->setCustomTips($customTips); //Section Related Functions $sections = $guidance->getSections(); $sectionName = $guidance->getSectionName($sectionCode); $previousSectionCode = $guidance->previousSection($sectionCode, $dashboardCode = 'dashboard'); $nextSectionCode = $guidance->nextSection($sectionCode, $dashboardCode = 'dashboard'); //Get All Tasks $tasks = $guidance->getTasks(); //Get Section Tasks $tasks = $guidance->getTasks([sectionCode]); //Get Task $task = $guidance->getTask([taskId]); $task = $guidance->getTaskByMenuName($menuName); //Or load Task 1 directly $task = Task::load(1,'en');
Accessing Task Details
<?php /** @var \DOE_50001_Ready\Task $task */ //Available Task Data $task->id(); $task->getMenuName(); $task->getTitle(); $task->language_requested; $task->language_displayed; /** ONLY AVAILABLE WHEN TASKS LOADED THROUGH GUIDANCE */ $task->sectionCode; $task->section; $task->relatedIsoSections; $task->prerequisites; $task->leadsTo; $task->custom_tips; //customTips Must be externally loaded with $guidance->setCustomTips($customTips); $task->resources; //With Processed Markup Text $task->getGettingItDone(); $task->getTaskOverview(); $task->getFullDescription(); $task->getOtherIsoTips(); $task->getEnergyStarTips(); $task->getCustomTips();
Accessing Resource Details
<?php /** @var \DOE_50001_Ready\Resource $resource */ //Available Task Data $resource->id; $resource->name; $resource->file_type; $resource->short_description; $resource->file_name; $resource->link;
Guidance Markup
The DefaultMarkupProcessor flattens the task markup tags by replacing them with basic text.
How to set a new Markup Processor:
//Create a new Markup Processor that implements the required interface class NewMarkupProcessor implementes MarkupProcessorInterface //Inject the new Markup Processor into the Guidance or Tasks $guidance = new Guidance($language, NewMarkupProcessor::class); $task = new Task::load($task_id, $language, NewMarkupProcessor::class);
Types of Markup
Task Links
Embedded link to other Tasks
[task](Menu Name)
Resource Links
Embedded link to Resources
[resource](Resource_Code_Name)
Accordions
Requires opening and closing tags
Allows content to be open and collapsed
[Accordion](Title of Accordion Content) **Accordion Content** [Accordion End]
Learn More
Requires opening and closing tags
Allows content to be open and collapsed
[Learn More](Title of Learn More Content) **Learn More Content** [Learn More End]
Important Notes
- The English version of the guidance is both the default and primary version used as the basis for translated versions
- If a requested language is not available, the English version will be returned
- Non-English guidance content folders include a copy of the English version used for the translation to provide guidance on what needs to be updated when the English version is updated
Contributors
Library Developer: Michael B Muller
50001 Ready Task Guidance Developed by the:
- US Department of Energy
- Lawrence Berkeley National Laboratory
- Georgia Institute of Technology
统计信息
- 总下载量: 218
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-30