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

Reference_One->addTitle() changes #137

Closed
DarkSide666 opened this issue Aug 31, 2016 · 3 comments · Fixed by #139
Closed

Reference_One->addTitle() changes #137

DarkSide666 opened this issue Aug 31, 2016 · 3 comments · Fixed by #139
Assignees
Milestone

Comments

@DarkSide666
Copy link
Member

DarkSide666 commented Aug 31, 2016

  • addTitle() should return new Expression field not Reference_One instance;
  • addTitle() should have ability to pass $defaults to expression field;
  • addTitle() shouldn't set read_only=false, expressions should always be read_only=true. And no need for never_save=true here if we already set read_only=true;
  • addTitle() should by default advice UI to not show title field in forms as editable field. This can be overwritten by passing $defaults in addTitle() method.
@romaninsh
Copy link
Member

I disagree with the point 1.

$this->hasMany(..)->addTitle()->addFields()..

returning the title itself does not give us anything. We can suggest user to look into addField() if they want to do something fancy.

@romaninsh
Copy link
Member

I recommend adding: withTitle() same format as addTitle but would return Reference the way how addTitle works now.

@DarkSide666
Copy link
Member Author

agree, implemented: ed03e3b

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

Successfully merging a pull request may close this issue.

2 participants