Skip to content
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: add a way to clear prependTitle or appendTitle #12238

Closed
borisdelev opened this issue Sep 20, 2016 · 8 comments
Closed

NFR: add a way to clear prependTitle or appendTitle #12238

borisdelev opened this issue Sep 20, 2016 · 8 comments
Milestone

Comments

@borisdelev
Copy link
Contributor

borisdelev commented Sep 20, 2016

Hi there... i have idea about prependTitle and appendTitle- to manage and clear them. Maybe will be useful. What is you opinion?

Now

If we want to clear append or prepend title, must clear all values

\Phalcon\Tag::setTitleSeparator(' - ');
\Phalcon\Tag::setTitle('Title');

// Somewhere in controller
\Phalcon\Tag::prependTitle('Category');
\Phalcon\Tag::prependTitle('Article');

// In some situation, just want to clear all prepended element
\Phalcon\tag::resetInput();
\Phalcon\Tag::setTitleSeparator(' - ');
\Phalcon\Tag::setTitle('Title');
\Phalcon\Tag::prependTitle('Just article');

Idea

A way to clear elements and to add multiple elements at once (why not).

\Phalcon\Tag::setTitleSeparator(' - ');
\Phalcon\Tag::setTitle('Title');

// Somewhere in controller
\Phalcon\Tag::prependTitle('Category');
\Phalcon\Tag::prependTitle('Article');

// Same situation - clear and put just one prepend element (will be faster than clear all values)
\Phalcon\Tag::prependTitle(['Just article']);

// Or other - clear and put a few elements
\Phalcon\Tag::prependTitle(['Other category', 'Other article']);

Details

  • Phalcon version: 3.0.0 x64
  • PHP Version: 7.0.11 x64
  • Operating System: Windows 10
  • Server: Apache x64
  • Other related info (Database, table schema): MariaDB x64

Hope you understand me. Thanks

@sergeyklay sergeyklay added the enhancement Enhancement to the framework label Sep 20, 2016
@sergeyklay sergeyklay added this to the 3.1.0 milestone Sep 20, 2016
@sergeyklay sergeyklay added New Feature Request and removed enhancement Enhancement to the framework labels Sep 20, 2016
@borisdelev
Copy link
Contributor Author

borisdelev commented Sep 20, 2016

@sergeyklay it is out of topic, but please, if u have time... explain what mean BC?

So now _documentPrependTitle is array or null and this breaking BC

@Green-Cat
Copy link
Contributor

@borisdelev BC = Backward Compatibility.

@borisdelev
Copy link
Contributor Author

@Green-Cat Thank you!

@borisdelev
Copy link
Contributor Author

borisdelev commented Dec 9, 2016

Hi @sergeyklay ...

I try to make this feature, but for some reason travis-ci builds return error about "SessionTest"... i didnt modified anything connected with session. Is there something or i do wrong?

Thank you!

@sergeyklay
Copy link
Contributor

@borisdelev Please don't worry about it yet. I will need some time to fix the tests

@Jurigag
Copy link
Contributor

Jurigag commented Dec 9, 2016

I will fix those problems here - https://github.com/phalcon/cphalcon/pull/12445/commits just need to sit to it and finish this feature.

@borisdelev
Copy link
Contributor Author

Thank you! :) Wish u luck and prosper :)

@sergeyklay
Copy link
Contributor

Implemented in the 3.1.x branch. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants