public function maxCount($var = null)
    {
        //user_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated since Grav 1.6', E_USER_DEPRECATED);

        if ($var !== null) {
            $this->max_count = (int)$var;
        }
        if (empty($this->max_count)) {
            /** @var Config $config */
            $config = Grav::instance()['config'];
            $this->max_count = (int)$config->get('system.pages.list.count');
        }

        return $this->max_count;
    }
public function maxCount($var = null)
    {
        //user_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated since Grav 1.6', E_USER_DEPRECATED);

        if ($var !== null) {
            $this->max_count = (int)$var;
        }
        if (empty($this->max_count)) {
            /** @var Config $config */
            $config = Grav::instance()['config'];
            $this->max_count = (int)$config->get('system.pages.list.count');
        }

        return $this->max_count;
    }
public function maxCount ( $ var = null ) { //user_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated since Grav 1.6', E_USER_DEPRECATED); if ( $ var !== null ) { $ this -> max_count = ( int ) $ var ; } if ( empty ( $ this -> max_count ) ) { /** @var Config $config */ $ config = Grav :: instance ( ) [ 'config' ] ; $ this -> max_count = ( int ) $ config -> get ( 'system.pages.list.count' ) ; } return $ this -> max_count ; }
Gets and sets the maxCount field which describes how many sub-pages should be displayed if the
sub_pages header property is set for this page object.

@param  int $var the maximum number of sub-pages

@return int      the maximum number of sub-pages
@deprecated 1.6
Gets and sets the maxCount field which describes how many sub - pages should be displayed if the sub_pages header property is set for this page object .