Creates a slide for the given list item.

@param ViewableData $item

@return Slide
168244
protected function createSlide(ViewableData $item)
    {
        // Create Slide Object:
        
        $slide = Slide::create([
            'Title' => $item->MetaTitle,
            'ImageID' => $item->MetaImageID,
            'Caption' => $item->MetaImageCaption,
            'ParentID' => $this->ParentID,
            'HideImage' => $this->HideImage,
            'HideTitle' => $this->HideTitle,
            'HideCaption' => $this->HideCaption,
            'TitleAfterCaption' => $this->TitleAfterCaption
        ]);
        
        // Define Slide Link:
        
        $slide->LinkTo = LinkToExtension::MODE_URL;
        $slide->LinkURL = $item->MetaAbsoluteLink;
        $slide->LinkDisabled = $this->LinkDisabled;
        $slide->OpenLinkInNewTab = $this->OpenLinkInNewTab;
        
        // Answer Slide Object:
        
        return $slide;
    }
1057126
public function addItem(Item $item)
	{
		$item->source = $this->link;

		$this->items[] = $item;

		return $this;
	}
193558
public function createMenuNode($data) {
		$cls = $this->itemClass;
		$node = $cls::create($data, $this);
		$this->items[$node->ID] = $node;
		return $node;
	}
1264634
public function setItem(Item $item)
    {
        if ($this->item !== $item) {
            $this->item = $item->setType($this);
        }

        return $this;
    }
918900
public function addRow($item)
    {
        if (is_array($item)) {
            $item = array_merge($this->baseRow, ['class' => $this->rowClass, 'cells' => $item]);
            $item = Yii::createObject($item);
        }
        $this->_rows[] = $item;
        $this->_currentRow = null;

        return $item;
    }
214316
public function getItem($itemId, $data = null)
	{
		$params = $this->setUpParams('item', $itemId, $data, 'itemListData', 'itemData');
		$array  = $this->makeRequest('item', $itemId, $params);

		if ($this->appendId($itemId))
		{
			return new staticItem($array);
		}
		else
		{
			return new ItemList($array);
		}
	}
490690
protected function addItem(Item $item, int $position = null): Item
	{
		/* @var $this IParent */
		$item->setParent($this);
		if ($position !== null) {
			Arrays::slice($this->items, $position, $item);
		} else {
			$this->items[] = $item;
		}
		return $item;
	}
1256520
public function fillAction(Item $item)
    {
        // do fill
        $this->get('anime_db.item_folder_filler.filler_folder')->fillFolder($item);

        return $this->render('AnimeDbItemFolderFillerBundle:Filler:fill.html.twig', [
            'item' => $item
        ]);
    }
1128692
public function addItem(Model $item) : Collection
	{
		call_user_func([$this,$this->setterName()], $item);
		return $this;
	}
1157920
public function deleteItemAction(Item $item) {
        $em = $this->getDoctrine()->getManager();
        $em->remove($item);
        $em->flush();

        $view = $this->view();

        return $this->handleView($view);
    }
91860
public static function fromBuyable(Buyable $item, array $options = [])
    {
        return new self($item->getBuyableIdentifier($options), $item->getBuyableDescription($options), $item->getBuyablePrice($options), $options);
    }
281125
protected ItemData putItem(ItemData item)
   {
      if (item.isNode())
      {
         return putNode((NodeData)item, ModifyChildOption.MODIFY);
      }
      else
      {
         return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
      }
   }
295047
protected function createMediaEntity( $item ) {
		$m = new \Pressbooks\Entities\Cloner\Media();

		$m->id = $item['post_id'];
		$m->title = $item['post_title'];
		$m->description = $item['post_content'];
		$m->caption = $item['post_excerpt'];

		if ( isset( $item['postmeta'] ) && is_array( $item['postmeta'] ) ) {
			foreach ( $item['postmeta'] as $meta ) {
				if ( str_starts_with( $meta['key'], '_' ) === false ) {
					$m->meta[ $meta['key'] ] = $meta['value'];
				}
				if ( $meta['key'] === '_wp_attachment_image_alt' ) {
					$m->altText = $meta['value'];
				}
			}
		}

		$m->sourceUrl = $item['attachment_url'];

		return $m;
	}
295632
protected function renderItem($item, $depth=0)
	{
		//visibility
		if (isset($item['visible']) && $item['visible'] === false) return '';

		//prepare options
		$options = isset($item['options']) ? $item['options'] : [];
		Html::addCssClass($options, 'depth-' . $depth);
		if (isset($item['active']) && $item['active']) Html::addCssClass($options, 'active');
		if (isset($item['items']) && count($item['items']) > 0) Html::addCssClass($options, 'is-parent');

		//prepare returned code
		$ret = Html::beginTag('li', $options);
		$ret .= $this->createEntry($item, $depth);

		//render children recursively
		if (isset($item['items']) && ($this->maxDepth === null || ($this->maxDepth !== null && $depth + 1 <= $this->maxDepth))) {
			$ret .= Html::beginTag('ul');
			foreach ($item['items'] as $subItem) {
				$ret .= $this->renderItem($subItem, $depth + 1);
			}
			$ret .= Html::endTag('ul');
		}

		//finish and return
		$ret .= Html::endTag('li');
		return $ret;
	}
136182
public function importItem(Item $item)
    {
        foreach ($this->data as $templateData) {
            foreach ($item->getData() as $itemData) {
                if ($itemData->getName() === $templateData->getName()) {
                    $templateData->setName($itemData->getName());
                    $templateData->setValue($itemData->getValue());
                    $templateData->setPrompt($itemData->getPrompt());
                }
            }
        }

        return $this;
    }
1275903
public function addBuyable(Buyable $item, $qty = 1, array $options = [])
    {
        $cartItem = CartItem::fromBuyable($item, $options);

        return $this->addItemToCart($cartItem, $qty);
    }
366406
public function item($data, $transformer = null, $resourceKey = null): Item
    {
        return new Item($data, $transformer, $resourceKey);
    }