public function renderSlots(Page $page, array $slots, array $options = array())
    {
        $renderedSlots = array();
        $slots = $this->dispatchSlotsEvent(RenderEvents::SLOTS_RENDERING, $page, $slots);
        foreach ($slots as $slotName => $slot) {
            if (is_string($slot)) {
                $renderedSlots[$slotName] = $slot;
                continue;
            }

            if (!$slot instanceof Slot) {
                continue;
            }

            $renderedSlots[$slotName] = implode("", $this->renderSlot($slot));
        }

        $this->mediaFiles = array_unique($this->mediaFiles);

        return $this->dispatchSlotsEvent(RenderEvents::SLOTS_RENDERED, $page, $renderedSlots);
    }
public function renderSlots(Page $page, array $slots, array $options = array())
    {
        $renderedSlots = array();
        $slots = $this->dispatchSlotsEvent(RenderEvents::SLOTS_RENDERING, $page, $slots);
        foreach ($slots as $slotName => $slot) {
            if (is_string($slot)) {
                $renderedSlots[$slotName] = $slot;
                continue;
            }

            if (!$slot instanceof Slot) {
                continue;
            }

            $renderedSlots[$slotName] = implode("", $this->renderSlot($slot));
        }

        $this->mediaFiles = array_unique($this->mediaFiles);

        return $this->dispatchSlotsEvent(RenderEvents::SLOTS_RENDERED, $page, $renderedSlots);
    }
public function renderSlots ( Page $ page , array $ slots , array $ options = array ( ) ) { $ renderedSlots = array ( ) ; $ slots = $ this -> dispatchSlotsEvent ( RenderEvents :: SLOTS_RENDERING , $ page , $ slots ) ; foreach ( $ slots as $ slotName => $ slot ) { if ( is_string ( $ slot ) ) { $ renderedSlots [ $ slotName ] = $ slot ; continue ; } if ( ! $ slot instanceof Slot ) { continue ; } $ renderedSlots [ $ slotName ] = implode ( "" , $ this -> renderSlot ( $ slot ) ) ; } $ this -> mediaFiles = array_unique ( $ this -> mediaFiles ) ; return $ this -> dispatchSlotsEvent ( RenderEvents :: SLOTS_RENDERED , $ page , $ renderedSlots ) ; }
Renders page slots

@param \RedKiteCms\FilesystemEntity\Page $page
@param array $slots
@param array $options

@return array
Renders page slots