michaelbmuller/50001-ready-guidance-2018

v0.1 2019-08-24 18:17 UTC

This package is auto-updated.

Last update: 2024-09-17 11:35:10 UTC


README

Latest Stable Version Total Downloads Build Status License codecov PHP-Eye

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-2018
{
    "require": {
        "michaelbmuller/50001-ready-guidance-2018": "dev-master"
    }
}

Loading Guidance

<?php
require 'vendor/autoload.php';

use DOE_50001_2018_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