public function canAddChildren($member = null)
    {
        // Disable adding children to archived pages
        if (!$this->isOnDraft()) {
            return false;
        }

        if (!$member) {
            $member = Security::getCurrentUser();
        }

        // Standard mechanism for accepting permission changes from extensions
        $extended = $this->extendedCan('canAddChildren', $member);
        if ($extended !== null) {
            return $extended;
        }

        // Default permissions
        if ($member && Permission::checkMember($member, "ADMIN")) {
            return true;
        }

        return $this->canEdit($member) && $this->config()->get('allowed_children') !== 'none';
    }
public function canAddChildren($member = null)
    {
        // Disable adding children to archived pages
        if (!$this->isOnDraft()) {
            return false;
        }

        if (!$member) {
            $member = Security::getCurrentUser();
        }

        // Standard mechanism for accepting permission changes from extensions
        $extended = $this->extendedCan('canAddChildren', $member);
        if ($extended !== null) {
            return $extended;
        }

        // Default permissions
        if ($member && Permission::checkMember($member, "ADMIN")) {
            return true;
        }

        return $this->canEdit($member) && $this->config()->get('allowed_children') !== 'none';
    }
public function canAddChildren ( $ member = null ) { // Disable adding children to archived pages if ( ! $ this -> isOnDraft ( ) ) { return false ; } if ( ! $ member ) { $ member = Security :: getCurrentUser ( ) ; } // Standard mechanism for accepting permission changes from extensions $ extended = $ this -> extendedCan ( 'canAddChildren' , $ member ) ; if ( $ extended !== null ) { return $ extended ; } // Default permissions if ( $ member && Permission :: checkMember ( $ member , "ADMIN" ) ) { return true ; } return $ this -> canEdit ( $ member ) && $ this -> config ( ) -> get ( 'allowed_children' ) !== 'none' ; }
This function should return true if the current user can add children to this page. It can be overloaded to
customise the security model for an application.

Denies permission if any of the following conditions is true:
- alternateCanAddChildren() on a extension returns false
- canEdit() is not granted
- There are no classes defined in {@link $allowed_children}

@uses SiteTreeExtension->canAddChildren()
@uses canEdit()
@uses $allowed_children

@param Member|int $member
@return bool True if the current user can add children
This function should return true if the current user can add children to this page . It can be overloaded to customise the security model for an application .