insert_collection — Insert a collection

Collection-related functions

Summary

insert_collection($metadata = array(), $elementTexts = array())

Insert a collection

Parameters:
  • $metadata (array) – Follows the format: <code> array( ‘public’ => [true|false], ‘featured’ => [true|false] ) </code>

  • $elementTexts (array) – Array of element texts to assign to the collection. This follows the format: <code> array( [element set name] => array( [element name] => array( array(‘text’ => [string], ‘html’ => [false|true]), array(‘text’ => [string], ‘html’ => [false|true]) ), [element name] => array( array(‘text’ => [string], ‘html’ => [false|true]), array(‘text’ => [string], ‘html’ => [false|true]) ) ), [element set name] => array( [element name] => array( array(‘text’ => [string], ‘html’ => [false|true]), array(‘text’ => [string], ‘html’ => [false|true]) ), [element name] => array( array(‘text’ => [string], ‘html’ => [false|true]), array(‘text’ => [string], ‘html’ => [false|true]) ) ) ); </code>

Returns:

Collection

Usage

Examples

See Also