mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-02-14 15:58:41 +00:00
add/change docs
This commit is contained in:
parent
60bc825822
commit
1106d74676
|
|
@ -24,33 +24,130 @@ namespace Modules\Navigation\Models;
|
||||||
*/
|
*/
|
||||||
class NavElement
|
class NavElement
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Id.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public int $id = 0;
|
public int $id = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page Id.
|
||||||
|
*
|
||||||
|
* Generated from the path from a URI (sha1)
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public string $pid = '';
|
public string $pid = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the link.
|
||||||
|
*
|
||||||
|
* This "name" is a identifier for which is used in the language file for localization.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public string $name = '';
|
public string $name = '';
|
||||||
|
|
||||||
public int $type = 1;
|
/**
|
||||||
|
* Link type.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public int $type = LinkType::LINK;
|
||||||
|
|
||||||
public int $subtype = 2;
|
/**
|
||||||
|
* Navigation type (location of the link)
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public int $subtype = NavigationType::SIDE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Icon string (css string for icon).
|
||||||
|
*
|
||||||
|
* @var null|string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public ?string $icon = null;
|
public ?string $icon = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uri.
|
||||||
|
*
|
||||||
|
* @var null|string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public ?string $uri = null;
|
public ?string $uri = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link target (target="self").
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public string $target = 'self';
|
public string $target = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action to perform on click.
|
||||||
|
*
|
||||||
|
* @var null|string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public ?string $action = null;
|
public ?string $action = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module identifier.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public string $from = '0';
|
public string $from = '0';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public int $order = 1;
|
public int $order = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parent navigation element.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public int $parent = 0;
|
public int $parent = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User permission required to show link (null = always/any).
|
||||||
|
*
|
||||||
|
* @var null|int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public ?int $permissionPerm = null;
|
public ?int $permissionPerm = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Permission type required to show link (null = any).
|
||||||
|
*
|
||||||
|
* Modules have different permission types (e.g. customer).
|
||||||
|
* The available types are defind in the respective module in \Modules\???\Models\PermissionState
|
||||||
|
*
|
||||||
|
* @var null|int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public ?int $permissionType = null;
|
public ?int $permissionType = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Element these permissions must be valid for (null = any).
|
||||||
|
*
|
||||||
|
* @var null|int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public ?int $permissionElement = null;
|
public ?int $permissionElement = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@ class SearchControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
protected ModuleAbstract $module;
|
protected ModuleAbstract $module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
protected function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
$this->app = new class() extends ApplicationAbstract
|
$this->app = new class() extends ApplicationAbstract
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user