Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23225

Slight mistake on Public API Cookbook Doc

    XMLWordPrintable

Details

    Description

      At the Public API documentation, at the:
      https://doc.ez.no/display/EZP/2.+Browsing%2C+finding%2C+viewing
      at the subsection "Displaying values from a Content", on the code, at the part inside the "foreach":

      (...)
      $valueHash = $fieldType->toHash( $field->value );
      (...)

      I believe the $field->value part should be corrected to $field only, since the $field variable is already assigned a value variable type from the line above:
      $field = $content->getFieldValue( $fieldDefinition->identifier );
      Trying to fetch a value variable type parameter from what already seems to be a value variable type doesn't make sense to me.
      Found out while trying to base my code for a controller on this.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rui.silva-obsolete@ez.no Rui Silva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: