Search

after creating a post, I am trying to get the "entryid" of that newly created post. However, I am looking through the returned array, and the "entryid" is only available in a protected field which when I try and access, throws an error.

something like this:

$context['entry']->_fields['id']

which throws this:

Cannot access protected property Entry::$_fields in /site/extensions/extension/extension.driver.php on line ###

is there another way to get this value?

Have you tried $context['entry']->get('id')?

thanks craig. that worked. is there any documentation on how to access properties like that get method? i think that's one of the hardest things I've been trying to deal with when trying to understand how an extension works and how to access the actual content returned.

It's great to have the API documented for methods like this now.

ah sweet, thanks stephen. I wasn't sure if that stuff was in there or not and where to exactly look

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details