private function createNewDefaultContent($classname, $mainzone = false)
    {
        $content = new $classname();
        if (null !== $content->getProperty('labelized-by')) {
            try {
                $label = $content;
                foreach (explode('->', (string) $label->getProperty('labelized-by')) as $property) {
                    if (is_object($label->$property)) {
                        $label = $label->$property;
                    } else {
                        break;
                    }
                }

                $label->$property = $this->getTitle();
            } catch (\Exception $e) {
            }
        }

        if (true === $mainzone) {
            $content->setMainNode($this);
        }

        return $content;
    }
private function createNewDefaultContent($classname, $mainzone = false)
    {
        $content = new $classname();
        if (null !== $content->getProperty('labelized-by')) {
            try {
                $label = $content;
                foreach (explode('->', (string) $label->getProperty('labelized-by')) as $property) {
                    if (is_object($label->$property)) {
                        $label = $label->$property;
                    } else {
                        break;
                    }
                }

                $label->$property = $this->getTitle();
            } catch (\Exception $e) {
            }
        }

        if (true === $mainzone) {
            $content->setMainNode($this);
        }

        return $content;
    }
private function createNewDefaultContent ( $ classname , $ mainzone = false ) { $ content = new $ classname ( ) ; if ( null !== $ content -> getProperty ( 'labelized-by' ) ) { try { $ label = $ content ; foreach ( explode ( '->' , ( string ) $ label -> getProperty ( 'labelized-by' ) ) as $ property ) { if ( is_object ( $ label -> $ property ) ) { $ label = $ label -> $ property ; } else { break ; } } $ label -> $ property = $ this -> getTitle ( ) ; } catch ( \ Exception $ e ) { } } if ( true === $ mainzone ) { $ content -> setMainNode ( $ this ) ; } return $ content ; }
Creates a new default content to be pushed in layout columns.

@param  string               $classname
@param  boolean              $mainzone

@return AbstractClassContent
Creates a new default content to be pushed in layout columns .