src/Application.php
public function tabBuilder(\samsoncms\app\material\form\Form & $form)
    {
        // If we have related structures
        if (count($form->navigationIDs)) {
            // Get all gallery additional field for material form structures
            $galleryFields = $this->query->entity(\samsoncms\api\Field::class)
                ->where('Type', 9)
                ->join('structurefield')
                ->where('structurefield_StructureID', $form->navigationIDs)
                ->exec();

            // Create tab for each additional gallery field
            foreach ($galleryFields as $field) {
                $form->tabs[] = new Gallery($this, $this->query, $form->entity, $field);
            }
        }
    }
public function tabBuilder(\samsoncms\app\material\form\Form & $form)
    {
        // If we have related structures
        if (count($form->navigationIDs)) {
            // Get all gallery additional field for material form structures
            $galleryFields = $this->query->entity(\samsoncms\api\Field::class)
                ->where('Type', 9)
                ->join('structurefield')
                ->where('structurefield_StructureID', $form->navigationIDs)
                ->exec();

            // Create tab for each additional gallery field
            foreach ($galleryFields as $field) {
                $form->tabs[] = new Gallery($this, $this->query, $form->entity, $field);
            }
        }
    }
public function tabBuilder ( \ samsoncms \ app \ material \ form \ Form & $ form ) { // If we have related structures if ( count ( $ form -> navigationIDs ) ) { // Get all gallery additional field for material form structures $ galleryFields = $ this -> query -> entity ( \ samsoncms \ api \ Field :: class ) -> where ( 'Type' , 9 ) -> join ( 'structurefield' ) -> where ( 'structurefield_StructureID' , $ form -> navigationIDs ) -> exec ( ) ; // Create tab for each additional gallery field foreach ( $ galleryFields as $ field ) { $ form -> tabs [ ] = new Gallery ( $ this , $ this -> query , $ form -> entity , $ field ) ; } } }
Render all gallery additional fields as material form tabs
@param \samsoncms\app\material\form\Form $form Material form insctance
Render all gallery additional fields as material form tabs