first commit
This commit is contained in:
24
inc/impactcontext.class.php
Normal file
24
inc/impactcontext.class.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
if (!defined('GLPI_ROOT')) {
|
||||
die("Sorry. You can't access this file directly");
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 9.5.0.
|
||||
*/
|
||||
class ImpactContext extends CommonDBTM {
|
||||
|
||||
/**
|
||||
* Get ImpactContext for the given ImpactItem
|
||||
*
|
||||
* @param ImpactItem $item
|
||||
* @return ImpactContext|false
|
||||
*/
|
||||
public static function findForImpactItem(\ImpactItem $item) {
|
||||
$impactContext = new self();
|
||||
$exist = $impactContext->getFromDB($item->fields['impactcontexts_id']);
|
||||
|
||||
return $exist ? $impactContext : false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user