Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1421

Update AppController.structure event to use arrays

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.0-b1
    • Fix Version/s: 3.3.0-b2
    • Component/s: None
    • Labels:
      None

      Description

      The AppController.structure event currently uses strings for each of the content update section, instead it should use an array to ease in appending data (and possibly modifying data).

      For example, instead of:

      $return_val = $event->getReturnVal();
      if (!isset($return_val['body_start']))
          $return_val['body_start'];
      $return_val['body_start'] .= "<p>stuff</p>";
      $event->setReturnVal($return_val);
      

      You should be able to:

      $return_val = $event->getReturnVal();
      $return_val['body_start'][] = "<p>stuff</p>";
      $event->setReturnVal($return_val);
      

        Issue Links

          Activity

            People

            • Assignee:
              cody Cody Phillips (Inactive)
              Reporter:
              cody Cody Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Sep/14