Zend Framework Source Code Snippets

Application_Resource_Paginator

class Core_Application_Resource_Paginator extends Zend_Application_Resource_ResourceAbstract
{
    /**
     * Set the default scrolling style for the Paginator
     *
     * @param  string $scrollingStyle
     * @return Core_Application_Resource_Paginator
     */
    public function setDefaultScrollingStyle($scrollingStyle)
    {
        Zend_Paginator::setDefaultScrollingStyle($scrollingStyle);
        return $this;
    }

    /**
     * Set the default view partial for the Paginator
     *
     * @param  string|array $viewPartial
     * @return Core_Application_Resource_Paginator
     */
    public function setDefaultViewPartial($viewPartial)
    {
        Zend_View_Helper_PaginationControl::setDefaultViewPartial($viewPartial);
        return $this;
    }

    /**
     * Defined by Zend_Application_Resource_Resource
     *
     * @return void
     */
    public function init()
    {
    }
}


// Pass to Zend_Application like so:
resources.paginator.defaultScrollingStyle = "Sliding"
resources.paginator.defaultViewPartial = "paging.phtml"

Comments

You must login before commenting on a snippet. If you do not have an account, please register.

Allows you to configure the Paginator globally. This is helpful if you use a standard view partial for all pagination.

Created:
leek leek
9 months ago
Edited:
leek leek
9 months ago
Revision Id:
105
Edit Message:
Initial Release
Tags:
zend-application zend-application-resource
Comments:
0
Points:
1 (1 votes)

History

r105

Initial Release

leek leek
9 months ago
diff
r104

Initial Release

leek leek
9 months ago