Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions devkit/macros/create-crud-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
$sortFields = macro_get_named_argument('sort');
$createInline = !is_null(macro_get_named_argument('createInline'));
$menu = macro_get_named_argument('menu');
$module = macro_get_named_argument('module');

// {{{ Check arguments

Expand Down Expand Up @@ -81,7 +82,7 @@

$moduleAuthor = null;
$moduleName = null;
if (preg_match('/XLite\\\Module\\\([a-z0-9]+)\\\([a-z0-9]+)\\\Model/iSs', $entityClass, $match)) {
if (preg_match('/([a-z0-9]+)\\\([a-z0-9]+)/iSs', $module, $match) or preg_match('/XLite\\\Module\\\([a-z0-9]+)\\\([a-z0-9]+)\\\Model/iSs', $entityClass, $match)) {
$moduleAuthor = $match[1];
$moduleName = $match[2];
}
Expand Down Expand Up @@ -1995,7 +1996,10 @@ function macro_help()
--menu=section
Create menu section item. Default - no

Example: .dev/macro/$script --entity=XLite\\Module\\Developer\\Example\\Model\\Message --fields=subject --edit=subject --removable --search=subject --headSearch --pagintation --sort=subject --menu=catalog
--module=target_module
Identifiers of the module and its author. Default - taken from the --entity parameter.

Example: .dev/macro/$script --entity=XLite\\Module\\Developer\\Example\\Model\\Message --fields=subject --edit=subject --removable --search=subject --headSearch --pagintation --sort=subject --menu=catalog --module=Developer\\MyModule

HELP;
}
Expand Down