External changes from #6158

This commit is contained in:
fbsanchez 2021-01-19 18:00:28 +01:00
parent e43e9f1239
commit 6ea19ac5fa
2 changed files with 2 additions and 5 deletions

View File

@ -31,9 +31,6 @@ global $config;
require_once $config['homedir'].'/vendor/autoload.php'; require_once $config['homedir'].'/vendor/autoload.php';
require_once $config['homedir'].'/include/class/HTML.class.php'; require_once $config['homedir'].'/include/class/HTML.class.php';
use \HTML;
/** /**
* Global Wizard generic class. Needs to be inherited. * Global Wizard generic class. Needs to be inherited.
* *

View File

@ -61,12 +61,12 @@ abstract class Entity
/** /**
* Instances a new object using array definition. * Instances a new object using array definition.
* *
* @param string $class_str Class name.
* @param array $data Fields data. * @param array $data Fields data.
* @param string $class_str Class name.
* *
* @return object With current definition. * @return object With current definition.
*/ */
public static function build(string $class_str, array $data=[]) public static function build(array $data=[], string $class_str=__CLASS__)
{ {
$obj = new $class_str(); $obj = new $class_str();
// Set values. // Set values.