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

As a Developer I'd like methods to check if a Version is Draft/Published/Archived

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: High High
    • 1.11.0
    • None
    • None
    • None

    Description

      As a Developer I'd like methods to check if a Version is Draft/Published/Archived to not have to check using the constants.

      This is already on the Location object in API, and can be added in same way on VersionInfo.

      Here is how it looks like in Location:

          /**
           * Returns true if current location is a draft.
           *
           * @return bool
           */
          public function isDraft()
          {
              return $this->status === self::STATUS_DRAFT;
          }
      
      

      Class to contribute to (bottom, propoerties first): https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/API/Repository/Values/Content/VersionInfo.php

      Attachments

        Activity

          People

            Unassigned Unassigned
            andre.romcke-obsolete@ez.no André Rømcke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: