private function prepareGetChilds()
    {
        $fragment = new CNabuPHPMethodBuilder($this, 'getChilds', CNabuPHPMethodBuilder::METHOD_PROTECTED);
        $fragment->addComment("Get default childs of $this->entity_name from XML Element as Element > CDATA structure.");
        $fragment->addParam(
            'element', 'SimpleXMLElement', false, null, 'SimpleXMLElement',
            'XML Element to get childs'
        );

        if ($this->is_translated) {
            $fragment->addFragment(array(
                'parent::getChilds($element);'
            ));
        }

        if (is_array($this->element_childs) && count($this->element_childs) > 0) {
            if ($this->is_translated) {
                $fragment->addFragment('');
            }
            $fragment->addFragment('$this->getChildsAsCDATAFromList($element, array(');
            $count = count($this->element_childs);
            foreach ($this->element_childs as $field => $child) {
                $fragment->addFragment("    '$field' => '$child'" . (--$count > 0 ? ',' : ''));
            }
            $fragment->addFragment('), false);');
        }

        $this->getDocument()->addUse('\SimpleXMLElement');

        $this->addFragment($fragment);
    }
private function prepareGetChilds()
    {
        $fragment = new CNabuPHPMethodBuilder($this, 'getChilds', CNabuPHPMethodBuilder::METHOD_PROTECTED);
        $fragment->addComment("Get default childs of $this->entity_name from XML Element as Element > CDATA structure.");
        $fragment->addParam(
            'element', 'SimpleXMLElement', false, null, 'SimpleXMLElement',
            'XML Element to get childs'
        );

        if ($this->is_translated) {
            $fragment->addFragment(array(
                'parent::getChilds($element);'
            ));
        }

        if (is_array($this->element_childs) && count($this->element_childs) > 0) {
            if ($this->is_translated) {
                $fragment->addFragment('');
            }
            $fragment->addFragment('$this->getChildsAsCDATAFromList($element, array(');
            $count = count($this->element_childs);
            foreach ($this->element_childs as $field => $child) {
                $fragment->addFragment("    '$field' => '$child'" . (--$count > 0 ? ',' : ''));
            }
            $fragment->addFragment('), false);');
        }

        $this->getDocument()->addUse('\SimpleXMLElement');

        $this->addFragment($fragment);
    }
private function prepareGetChilds ( ) { $ fragment = new CNabuPHPMethodBuilder ( $ this , 'getChilds' , CNabuPHPMethodBuilder :: METHOD_PROTECTED ) ; $ fragment -> addComment ( "Get default childs of $this->entity_name from XML Element as Element > CDATA structure." ) ; $ fragment -> addParam ( 'element' , 'SimpleXMLElement' , false , null , 'SimpleXMLElement' , 'XML Element to get childs' ) ; if ( $ this -> is_translated ) { $ fragment -> addFragment ( array ( 'parent::getChilds($element);' ) ) ; } if ( is_array ( $ this -> element_childs ) && count ( $ this -> element_childs ) > 0 ) { if ( $ this -> is_translated ) { $ fragment -> addFragment ( '' ) ; } $ fragment -> addFragment ( '$this->getChildsAsCDATAFromList($element, array(' ) ; $ count = count ( $ this -> element_childs ) ; foreach ( $ this -> element_childs as $ field => $ child ) { $ fragment -> addFragment ( "    '$field' => '$child'" . ( -- $ count > 0 ? ',' : '' ) ) ; } $ fragment -> addFragment ( '), false);' ) ; } $ this -> getDocument ( ) -> addUse ( '\SimpleXMLElement' ) ; $ this -> addFragment ( $ fragment ) ; }
Prepares the getChilds method.
Prepares the getChilds method .