To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 4482

Show
Ignore:
Timestamp:
01/19/12 08:56:22 (4 months ago)
Author:
tboutell
Message:

A slot that cares about the order in which its media items are returned by getOrderedMediaItems needs to have a getMediaItemOrder() method. Fixes PR #657

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostropheExtraSlotsPlugin/trunk/lib/model/doctrine/PluginaPhotoGridSlot.class.php

    r4468 r4482  
    1313abstract class PluginaPhotoGridSlot extends BaseaPhotoGridSlot 
    1414{ 
    15  
     15  /** 
     16   * Return the ids of the associated media items in the desired order. 
     17   * It's OK to return ids of items that no longer exist,  
     18   * getOrderedMediaItems() will clean that up via a query. 
     19   * @return @array | null 
     20   */ 
     21  public function getMediaItemOrder() 
     22  { 
     23    $data = $this->getArrayValue(); 
     24    if (isset($data['order'])) 
     25    { 
     26      return $data['order']; 
     27    } 
     28    return null; 
     29  } 
    1630}