public function addChildComponentRow($type, $childComponentRow = null)
    {
        $r = $this->createChildRow('ChildComponents');
        $r->component = $type;
        $r->nr = $this->getMaxChildComponentNr($type)+1;
        $r->saved = 0;
        $r->save();

        if ($childComponentRow) {
            $childComponentRow->component_id = $this->component_id.'-'.substr($type, 0, 1).$r->nr;
        }
        return $r;
    }
public function addChildComponentRow($type, $childComponentRow = null)
    {
        $r = $this->createChildRow('ChildComponents');
        $r->component = $type;
        $r->nr = $this->getMaxChildComponentNr($type)+1;
        $r->saved = 0;
        $r->save();

        if ($childComponentRow) {
            $childComponentRow->component_id = $this->component_id.'-'.substr($type, 0, 1).$r->nr;
        }
        return $r;
    }
public function addChildComponentRow ( $ type , $ childComponentRow = null ) { $ r = $ this -> createChildRow ( 'ChildComponents' ) ; $ r -> component = $ type ; $ r -> nr = $ this -> getMaxChildComponentNr ( $ type ) + 1 ; $ r -> saved = 0 ; $ r -> save ( ) ; if ( $ childComponentRow ) { $ childComponentRow -> component_id = $ this -> component_id . '-' . substr ( $ type , 0 , 1 ) . $ r -> nr ; } return $ r ; }
im Controller + in der row
im Controller + in der row