New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Aliases in Paginator #10957

Closed
quasipickle opened this Issue Sep 17, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@quasipickle
Copy link
Contributor

quasipickle commented Sep 17, 2015

When building pagination, "Page.before" is absolutely not the term I would use for the page number previous to the current page. Could we get some aliases for that? Since it's a stdClass, I figure the overhead is pretty minimal.

Aliases I would use/could see others using:
previous
prev
back

@williamokano

This comment has been minimized.

Copy link

williamokano commented Sep 17, 2015

@andresgutierrez It's a bad idea to change the function

public function getPaginate() -> <\stdclass>

To something like that?

public function getPaginate(var aliases = []) -> <\stdclass>

// ...... lots of code
let page = new \stdClass(),
// ...... more code

for alias, alias_to in aliases {
    let page->{alias} = page->{alias_to};
}

return page;

I'm very new to the zephir lang and this looks like a very easy contribution I could make to phalcon.

KorsaR-ZN added a commit to KorsaR-ZN/phalcon-core that referenced this issue Sep 29, 2015

@stale

This comment has been minimized.

Copy link

stale bot commented Apr 17, 2018

Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues

@stale stale bot added the stale label Apr 17, 2018

@sergeyklay sergeyklay closed this Apr 17, 2018

CameronHall added a commit to CameronHall/cphalcon that referenced this issue Dec 11, 2018

CameronHall added a commit to CameronHall/cphalcon that referenced this issue Dec 11, 2018

niden added a commit that referenced this issue Dec 12, 2018

niden added a commit to niden/cphalcon that referenced this issue Dec 12, 2018

[phalcon#13439] - Merge branch '4.0.x' into T13439-PSR-16
* 4.0.x:
  Updated changelog
  Fixed Paginator Query Builder tests
  Added ".zephir/" and ".temp/" to gitignore
  Cleaned up Pagination Adapters
  Fixes phalcon#13368: Query builder now supports binded params
  Updated tests to support Paginator Repository
  Updated Pagination Repository to maintain backwards compatibility
  added new feature phalcon#10957
  Implemented test for Security/Random/Base58Cest
  Fixed styling using phpcbf
  Fixed intergrations tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment