how do i get entry_id in field extension?
This is an open discussion with 3 replies, filed under Extensions.
Search
Class fieldacl_php extends Field ... public function displayPublishPanel(){ $adminpage = $this->_Parent->_Parent->_Parent->getPageCallback(); $entry_id = $adminpage['context']['entry_id'] ;
Please keep in mind that $this->_Parent->_Parent->_Parent->getPageCallback();
will no longer work in the upcoming Symphony 2.2 release. You’ll have to replace it with Symphony::Engine()->getPageCallback();
.
You can find more information about this change here:
http://getsymphony.com/discuss/blog/entry/a-guide-to-accessor-changes-in-symphony-22/.
There should be no need for any of that. Check the core field class’s method signature, entry_id is passed as a parameter to displayPublishPanel
Create an account or sign in to comment.
i am creating a field extension, basically copying and pasting from selectbox_link.
but how do i get the entry_id of current entry which i am editing? I tried to get it from “context”
like
which all fail..