src/App.php
public function __async_table($materialId, $structureId)
    {
        /** @var array $result Asynchronous response */
        $result = array('status' => false);

        /** @var \samson\cms\Navigation $structure Current table structure */
        $structure = $this->query->className('\samson\cms\Navigation')->cond('StructureID', $structureId)->first();
        $material = $this->query->className('\samson\cms\Material')->cond('MaterialID', $materialId)->first();

        // If such structure exists
        if (isset($structureId)) {
            /** @var MaterialTableTabLocalized $tab New tab with updated table */
            $tab = new MaterialTable($this, $this->query->className('\samson\cms\CMSMaterial'), $material, $structure);

            // Get HTML code of this tab
            $content = $tab->content();
            
            // If need change content
            Event::fire('samson.cms.web.materialtable.get.table', array($materialId, $structureId, & $content));
            
            // Set success status and generated HTML
            $result['status'] = true;
            $result['table'] = $content;
        }

        // Return result of this controller
        return $result;
    }
public function __async_table($materialId, $structureId)
    {
        /** @var array $result Asynchronous response */
        $result = array('status' => false);

        /** @var \samson\cms\Navigation $structure Current table structure */
        $structure = $this->query->className('\samson\cms\Navigation')->cond('StructureID', $structureId)->first();
        $material = $this->query->className('\samson\cms\Material')->cond('MaterialID', $materialId)->first();

        // If such structure exists
        if (isset($structureId)) {
            /** @var MaterialTableTabLocalized $tab New tab with updated table */
            $tab = new MaterialTable($this, $this->query->className('\samson\cms\CMSMaterial'), $material, $structure);

            // Get HTML code of this tab
            $content = $tab->content();
            
            // If need change content
            Event::fire('samson.cms.web.materialtable.get.table', array($materialId, $structureId, & $content));
            
            // Set success status and generated HTML
            $result['status'] = true;
            $result['table'] = $content;
        }

        // Return result of this controller
        return $result;
    }
public function __async_table ( $ materialId , $ structureId ) { /** @var array $result Asynchronous response */ $ result = array ( 'status' => false ) ; /** @var \samson\cms\Navigation $structure Current table structure */ $ structure = $ this -> query -> className ( '\samson\cms\Navigation' ) -> cond ( 'StructureID' , $ structureId ) -> first ( ) ; $ material = $ this -> query -> className ( '\samson\cms\Material' ) -> cond ( 'MaterialID' , $ materialId ) -> first ( ) ; // If such structure exists if ( isset ( $ structureId ) ) { /** @var MaterialTableTabLocalized $tab New tab with updated table */ $ tab = new MaterialTable ( $ this , $ this -> query -> className ( '\samson\cms\CMSMaterial' ) , $ material , $ structure ) ; // Get HTML code of this tab $ content = $ tab -> content ( ) ; // If need change content Event :: fire ( 'samson.cms.web.materialtable.get.table' , array ( $ materialId , $ structureId , & $ content ) ) ; // Set success status and generated HTML $ result [ 'status' ] = true ; $ result [ 'table' ] = $ content ; } // Return result of this controller return $ result ; }
Async updating material table
@param int $materialId Current material identifier
@param int $structureId Current table structure identifier
@return array Asynchronous response
Async updating material table