<?php
/**
 * CMDB Status Handler.
 *
 * @package     i-doit
 * @subpackage  General
 * @author      Dennis Stuecken <dstuecken@synetics.de>
 * @version     0.9
 * @copyright   synetics GmbH
 * @license     http://www.i-doit.com/license
 */

// ITIL Status.
$l_status = [0 => ''];
$l_dao_cmdb = new isys_cmdb_dao_status(isys_application::instance()->database);

$l_status_dao = $l_dao_cmdb->get_cmdb_status();

while ($l_row = $l_status_dao->get_row()) {
    if ($l_row['isys_cmdb_status__editable']) {
        $l_status[$l_row["isys_cmdb_status__id"]] = isys_application::instance()->container->get('language')
            ->get($l_row["isys_cmdb_status__title"]);
    }
}

isys_application::instance()->template->assign("www_dir", $g_config["www_dir"])
    ->assign("cmdb_status", $l_status);
