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

Introduce Tag::renderTitle() and change Tag::getTitle() #13547

Closed
scrnjakovic opened this Issue Oct 22, 2018 · 1 comment

Comments

Projects
2 participants
@scrnjakovic
Copy link
Contributor

scrnjakovic commented Oct 22, 2018

I think we should consider changing implementation of Phalcon\Tag::getTitle in following manner:

public static function getTitle($prepend = true, $append = true) {}

public static function renderTitle() {}

So it allows following:

Tag::prependTitle('Hello');
Tag::setTitle('World');
Tag::appendTitle('from Phalcon');

echo Tag::getTitle(); // Hello World from Phalcon
echo Tag::getTitle(false); // World from Phalcon
echo Tag::getTitle(true, false); // Hello World
echo Tag::getTitle(false, false); // World

echo Tag::renderTitle(); // <title>Hello World From Phalcon</title>

This, obviously, breaks BC so I propose adding this for 4.0
I'm not sure on how to name Volt counterparts tbh.

Why do we need this? Well, it just makes working with titles and page titles far more convenient.

niden added a commit to niden/cphalcon that referenced this issue Nov 1, 2018

@niden niden self-assigned this Nov 1, 2018

@niden niden added this to the 4.0.0 milestone Nov 1, 2018

niden added a commit to niden/cphalcon that referenced this issue Nov 1, 2018

niden added a commit to niden/cphalcon that referenced this issue Nov 1, 2018

niden added a commit to niden/cphalcon that referenced this issue Nov 1, 2018

Merge branch 'feature/T13547-tag-enhancements' into 4.0.x
* feature/T13547-tag-enhancements:
  [phalcon#13547] - Updated changelog
  [phalcon#13547] - Corrected name of the method and tests
  [phalcon#13547] - Changed getTitle and added renderTitle

@niden niden referenced this issue Nov 2, 2018

Merged

T13547 - Tag enhancements #13568

3 of 3 tasks complete
@niden

This comment has been minimized.

Copy link
Member

niden commented Nov 3, 2018

This has been implemented in 4.x

@niden niden closed this Nov 3, 2018

niden added a commit to niden/cphalcon that referenced this issue Nov 3, 2018

Merge branch 'feature/T11608-modify-redis-backend' of git://github.co…
…m/niden/cphalcon into feature/T11608-modify-redis-backend

* 'feature/T11608-modify-redis-backend' of git://github.com/niden/cphalcon:
  [phalcon#13547] - Updated changelog
  [phalcon#13547] - Corrected name of the method and tests
  [phalcon#13547] - Changed getTitle and added renderTitle
  change: change log write error
  -Fixed  `\Phalcon\Http\Response::setFileToSend` filename last much _
  Refactored `Phalcon\Db\Adapter\Pdo::query` to use PDO's prepare and execute. `Phalcon\Db\Adapter::fetchAll` to use PDO's fetchAll
  style: PSR2 style error
  Added: `Phalcon\Acl\Adapter\Memory::addRole` support multiple inherited

niden added a commit to niden/cphalcon that referenced this issue Nov 4, 2018

[phalcon#13543] - Merge branch '4.0.x' into T13543-add-more-pdo-types-3
* 4.0.x:
  [PR12189] - Removed unused variables; Corrected missing use statement
  [PR12189] - Corrected typo
  [PR12189] - Minor changes based on review
  [PR12189] - Modified header class and corrected tests
  [PR12189] - Corrected logic and test
  [PR12189] - Fixed tests
  [PR12189] - Added test for hasHeader
  [PR12189] - Updated changelog
  [PR12189] - Added hasHeader method
  Minor CI's config refactor and improvements
  [phalcon#13547] - Updated changelog
  [phalcon#13547] - Corrected name of the method and tests
  [phalcon#13547] - Changed getTitle and added renderTitle

@niden niden added this to Done in 4.0 Release Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment