* Modify entity list and story list.
This commit is contained in:
@@ -59,17 +59,13 @@ class entityList extends wg
|
||||
|
||||
protected function getItems()
|
||||
{
|
||||
global $lang;
|
||||
$items = $this->prop('items', array());
|
||||
$list = array();
|
||||
|
||||
foreach($items as $key => $entities)
|
||||
foreach($items as $key => $entity)
|
||||
{
|
||||
$list[] = array('id' => $key, 'title' => $lang->story->typeList[$key]);
|
||||
foreach($entities as $entity)
|
||||
{
|
||||
$list[] = $this->getItem($entity);
|
||||
}
|
||||
if(is_string($entity)) $entity = (object)array('id' => $key, 'title' => $entity);
|
||||
$list[] = $this->getItem($entity);
|
||||
}
|
||||
|
||||
return $list;
|
||||
|
||||
@@ -34,4 +34,29 @@ class storyList extends entitylist
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
protected function getItems()
|
||||
{
|
||||
global $lang;
|
||||
$items = $this->prop('items', array());
|
||||
$list = array();
|
||||
|
||||
foreach($items as $key => $entity)
|
||||
{
|
||||
if(is_object($entity))
|
||||
{
|
||||
$list[] = $this->getItem($entity);
|
||||
}
|
||||
elseif(is_array($entity))
|
||||
{
|
||||
$list[] = array('id' => $key, 'title' => $lang->story->typeList[$key]);
|
||||
foreach($entity as $subEntity)
|
||||
{
|
||||
$list[] = $this->getItem($subEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user