private function setDefaultProperties($uid = null, Section $mainSection = null, $title = null, $url = null, $target = self::DEFAULT_TARGET)
    {
        $this->_state = Page::STATE_HIDDEN;
        $this->_target = $target;
        $this->_created = new \DateTime();
        $this->_modified = new \DateTime();
        $this->_title = $title;
        $this->_url = $url;
        $this->_type = Page::TYPE_DYNAMIC;

        if (null === $mainSection) {
            $mainSection = new Section($uid, ['page' => $this]);
        }
        $this->setMainSection($mainSection);
        $this->_uid = $mainSection->getUid();

        return $this;
    }
private function setDefaultProperties($uid = null, Section $mainSection = null, $title = null, $url = null, $target = self::DEFAULT_TARGET)
    {
        $this->_state = Page::STATE_HIDDEN;
        $this->_target = $target;
        $this->_created = new \DateTime();
        $this->_modified = new \DateTime();
        $this->_title = $title;
        $this->_url = $url;
        $this->_type = Page::TYPE_DYNAMIC;

        if (null === $mainSection) {
            $mainSection = new Section($uid, ['page' => $this]);
        }
        $this->setMainSection($mainSection);
        $this->_uid = $mainSection->getUid();

        return $this;
    }
private function setDefaultProperties ( $ uid = null , Section $ mainSection = null , $ title = null , $ url = null , $ target = self :: DEFAULT_TARGET ) { $ this -> _state = Page :: STATE_HIDDEN ; $ this -> _target = $ target ; $ this -> _created = new \ DateTime ( ) ; $ this -> _modified = new \ DateTime ( ) ; $ this -> _title = $ title ; $ this -> _url = $ url ; $ this -> _type = Page :: TYPE_DYNAMIC ; if ( null === $ mainSection ) { $ mainSection = new Section ( $ uid , [ 'page' => $ this ] ) ; } $ this -> setMainSection ( $ mainSection ) ; $ this -> _uid = $ mainSection -> getUid ( ) ; return $ this ; }
Sets the default values to properties.

@param  string|null          $uid
@param  Section|null         $mainSection
@param  string|null          $title
@param  string|null          $url
@param  string               $target

@return Page
Sets the default values to properties .