PHRAS-3712 admin - sudefinition - property to define building rules on subdefinition (#4104)

* add building rules

* setting in first position

attribute `tobuild` on subdefinition

limit subdef name to 64 like db

taken account tobuild in tools rebuild GUI

taken account tobuild in command `bin/console records:build-subdefs`

* add check

* add tobuild in api response

* fix command `bin/console records:build-subdefs`
This commit is contained in:
Aina Sitraka
2022-07-27 19:25:44 +03:00
committed by GitHub
parent db948889f2
commit 8efdc36efa
16 changed files with 172 additions and 120 deletions

View File

@@ -242,10 +242,11 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
* @param array $labels
* @param boolean $orderable
* @param string $preset
* @param boolean $toBuild
* @return databox_subdefsStructure
* @throws Exception
*/
public function set_subdef($group, $name, $class, $downloadable, $options, $labels, $orderable = true, $preset = "Custom")
public function set_subdef($group, $name, $class, $downloadable, $options, $labels, $orderable = true, $preset = "Custom", $toBuild = true)
{
$dom_struct = $this->databox->get_dom_structure();
@@ -254,6 +255,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
$subdef->setAttribute('name', mb_strtolower($name));
$subdef->setAttribute('downloadable', ($downloadable ? 'true' : 'false'));
$subdef->setAttribute('orderable', ($orderable ? 'true' : 'false'));
$subdef->setAttribute('tobuild', ($toBuild ? 'true' : 'false'));
$subdef->setAttribute('presets', $preset);
foreach ($labels as $code => $label) {