芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/smart-slider-3/Nextend/SmartSlider3/Renderable/Item/ItemFactory.php
getOwner() ->getElementID(); if (!isset(self::$i[$elementID])) { self::$i[$elementID] = 0; } self::$i[$elementID]++; $id = $elementID . 'item' . self::$i[$elementID]; return $factory->createFrontend($id, $itemData['values'], $layer); } /** * @param AbstractRenderableOwner $slide * @param array $item */ public static function getFilled($slide, &$item) { $type = $item['type']; if (isset(self::$items[$type])) { $item['values'] = self::$items[$type]->getFilled($slide, new Data($item['values'])) ->toArray(); } } /** * @param ExportSlider $export * @param $item */ public static function prepareExport($export, $item) { $type = $item['type']; if (isset(self::$items[$type])) { self::$items[$type]->prepareExport($export, new Data($item['values'])); } } /** * @param ImportSlider $import * @param $item * * @return mixed */ public static function prepareImport($import, $item) { $type = $item['type']; if (isset(self::$items[$type])) { $item['values'] = self::$items[$type]->prepareImport($import, new Data($item['values'])) ->toArray(); } return $item; } public static function prepareSample($item) { $type = $item['type']; if (isset(self::$items[$type])) { $item['values'] = self::$items[$type]->prepareSample(new Data($item['values'])) ->toArray(); } return $item; } /** * @param AbstractItem $item */ public function addItem($item) { self::$items[$item->getType()] = $item; } protected function init() { new ItemHeading($this); new ItemButton($this); new ItemImage($this); new ItemText($this); new ItemVimeo($this); new ItemYouTube($this); $this->makePluggable('RenderableItem'); self::uasort(self::$items); self::$itemGroups[n2_x('Basic', 'Layer group')] = array(); self::$itemGroups[n2_x('Media', 'Layer group')] = array(); foreach (self::$items as $type => $item) { $group = $item->getGroup(); if (!isset(self::$itemGroups[$group])) { self::$itemGroups[$group] = array(); } self::$itemGroups[$group][$type] = $item; } new ItemMissing($this); } } ItemFactory::getInstance();