__construct()
public function __construct(?string $module_name = null)
Description
Constructor for the Trongate_administrators module. Calls parent constructor and initializes dashboard home URL and login URL.
Note: The framework automatically instantiates Trongate_administrators via $this->trongate_administrators. You rarely need to call this constructor manually.
Parameters
| Parameter | Type | Description | Default | Required |
|---|---|---|---|---|
| module_name | string|null | The module name (passed by framework for integration with Trongate module system). | null | No |
Return Value
| Type | Description |
|---|---|
| void | Constructor does not return a value. |
Example Usage
PHP
<?php
// Automatic instantiation by framework (inside a controller)
class Products extends Trongate {
public function manage() {
// $this->trongate_administrators is automatically an instance
$this->trongate_administrators->make_sure_allowed();
}
}
// Manual instantiation (rare)
$admin = new Trongate_administrators('products');