src/TemplatesCollection.php
public function registerBasicTemplates()
    {
        $templates = [
            [
                'name'        => 'add_iblock',
                'path'        => $this->dir.'/add_iblock.template',
                'description' => 'Add iblock',
            ],
            [
                'name'        => 'add_iblock_type',
                'path'        => $this->dir.'/add_iblock_type.template',
                'description' => 'Add iblock type',
            ],
            [
                'name'        => 'add_iblock_element_property',
                'path'        => $this->dir.'/add_iblock_element_property.template',
                'description' => 'Add iblock element property',
                'aliases'     => [
                    'add_iblock_prop',
                    'add_iblock_element_prop',
                    'add_element_prop',
                    'add_element_property',
                ],
            ],
            [
                'name'        => 'add_uf',
                'path'        => $this->dir.'/add_uf.template',
                'description' => 'Add user field (for sections, users e.t.c)',
            ],
            [
                'name'        => 'add_table',
                'path'        => $this->dir.'/add_table.template',
                'description' => 'Create table',
                'aliases'     => [
                    'create_table',
                ],
            ],
            [
                'name'        => 'delete_table',
                'path'        => $this->dir.'/delete_table.template',
                'description' => 'Drop table',
                'aliases'     => [
                    'drop_table',
                ],
            ],
            [
                'name'        => 'query',
                'path'        => $this->dir.'/query.template',
                'description' => 'Simple database query',
            ],
        ];

        foreach ($templates as $template) {
            $this->registerTemplate($template);
        }
    }
public function registerBasicTemplates()
    {
        $templates = [
            [
                'name'        => 'add_iblock',
                'path'        => $this->dir.'/add_iblock.template',
                'description' => 'Add iblock',
            ],
            [
                'name'        => 'add_iblock_type',
                'path'        => $this->dir.'/add_iblock_type.template',
                'description' => 'Add iblock type',
            ],
            [
                'name'        => 'add_iblock_element_property',
                'path'        => $this->dir.'/add_iblock_element_property.template',
                'description' => 'Add iblock element property',
                'aliases'     => [
                    'add_iblock_prop',
                    'add_iblock_element_prop',
                    'add_element_prop',
                    'add_element_property',
                ],
            ],
            [
                'name'        => 'add_uf',
                'path'        => $this->dir.'/add_uf.template',
                'description' => 'Add user field (for sections, users e.t.c)',
            ],
            [
                'name'        => 'add_table',
                'path'        => $this->dir.'/add_table.template',
                'description' => 'Create table',
                'aliases'     => [
                    'create_table',
                ],
            ],
            [
                'name'        => 'delete_table',
                'path'        => $this->dir.'/delete_table.template',
                'description' => 'Drop table',
                'aliases'     => [
                    'drop_table',
                ],
            ],
            [
                'name'        => 'query',
                'path'        => $this->dir.'/query.template',
                'description' => 'Simple database query',
            ],
        ];

        foreach ($templates as $template) {
            $this->registerTemplate($template);
        }
    }
public function registerBasicTemplates ( ) { $ templates = [ [ 'name' => 'add_iblock' , 'path' => $ this -> dir . '/add_iblock.template' , 'description' => 'Add iblock' , ] , [ 'name' => 'add_iblock_type' , 'path' => $ this -> dir . '/add_iblock_type.template' , 'description' => 'Add iblock type' , ] , [ 'name' => 'add_iblock_element_property' , 'path' => $ this -> dir . '/add_iblock_element_property.template' , 'description' => 'Add iblock element property' , 'aliases' => [ 'add_iblock_prop' , 'add_iblock_element_prop' , 'add_element_prop' , 'add_element_property' , ] , ] , [ 'name' => 'add_uf' , 'path' => $ this -> dir . '/add_uf.template' , 'description' => 'Add user field (for sections, users e.t.c)' , ] , [ 'name' => 'add_table' , 'path' => $ this -> dir . '/add_table.template' , 'description' => 'Create table' , 'aliases' => [ 'create_table' , ] , ] , [ 'name' => 'delete_table' , 'path' => $ this -> dir . '/delete_table.template' , 'description' => 'Drop table' , 'aliases' => [ 'drop_table' , ] , ] , [ 'name' => 'query' , 'path' => $ this -> dir . '/query.template' , 'description' => 'Simple database query' , ] , ] ; foreach ( $ templates as $ template ) { $ this -> registerTemplate ( $ template ) ; } }
Register basic templates.
Register basic templates .