src/Adapter/ExtractAdapter.php
public function extractForm($className = null)
    {
        $traced   = $this->findTraced($className);
        $form     = $traced['args'][1]['form'];
        $controls = [];

        foreach ($form->fieldsets as $fieldset) {
            foreach ($fieldset->controls as $control) {
                $controls[$control->name] = $this->resolveFieldValue($control->name, $form->row, $control);
            }
        }
        $this->extractHiddens($controls, $form->hiddens);

        $name = $this->extractModuleName($traced);
        $name = str_replace('_', '-', $name);
        $name = str_replace('components/', 'antaresproject/component-', $name);

        $memory = app('antares.memory')->get("extensions.active.{$name}");
        if (is_null($memory)) {
            $memory = ['fullname' => 'core'];
        }
        $component = Component::findOneByName($memory['fullname']);


        $attributes = [
            'component_id' => $component->id,
            'component'    => $name,
            'controls'     => $controls
        ];
        return $attributes;
    }
public function extractForm($className = null)
    {
        $traced   = $this->findTraced($className);
        $form     = $traced['args'][1]['form'];
        $controls = [];

        foreach ($form->fieldsets as $fieldset) {
            foreach ($fieldset->controls as $control) {
                $controls[$control->name] = $this->resolveFieldValue($control->name, $form->row, $control);
            }
        }
        $this->extractHiddens($controls, $form->hiddens);

        $name = $this->extractModuleName($traced);
        $name = str_replace('_', '-', $name);
        $name = str_replace('components/', 'antaresproject/component-', $name);

        $memory = app('antares.memory')->get("extensions.active.{$name}");
        if (is_null($memory)) {
            $memory = ['fullname' => 'core'];
        }
        $component = Component::findOneByName($memory['fullname']);


        $attributes = [
            'component_id' => $component->id,
            'component'    => $name,
            'controls'     => $controls
        ];
        return $attributes;
    }
public function extractForm ( $ className = null ) { $ traced = $ this -> findTraced ( $ className ) ; $ form = $ traced [ 'args' ] [ 1 ] [ 'form' ] ; $ controls = [ ] ; foreach ( $ form -> fieldsets as $ fieldset ) { foreach ( $ fieldset -> controls as $ control ) { $ controls [ $ control -> name ] = $ this -> resolveFieldValue ( $ control -> name , $ form -> row , $ control ) ; } } $ this -> extractHiddens ( $ controls , $ form -> hiddens ) ; $ name = $ this -> extractModuleName ( $ traced ) ; $ name = str_replace ( '_' , '-' , $ name ) ; $ name = str_replace ( 'components/' , 'antaresproject/component-' , $ name ) ; $ memory = app ( 'antares.memory' ) -> get ( "extensions.active.{$name}" ) ; if ( is_null ( $ memory ) ) { $ memory = [ 'fullname' => 'core' ] ; } $ component = Component :: findOneByName ( $ memory [ 'fullname' ] ) ; $ attributes = [ 'component_id' => $ component -> id , 'component' => $ name , 'controls' => $ controls ] ; return $ attributes ; }
extracting form properties

@return array
extracting form properties