About getMIGXtv
UPDATE: 1.0.1-plgetMIGXtv is a snippet that takes the value of a MIGX TV and converts it into a PHP array before storing it as a placeholder for use in other snippets/chunks. Arrays can be re-keyed using any available field, e.g. MIGX_id, and placeholders can be given a custom name.
Information
Released
November 22, 2016
Supported Database
MySQL
License
MIT
Supported Versions
2.0 - <2.5
Downloads
1,208
Instructions
/*** Package: getMIGXtv** Version: 1.0.1** Author: Jim Forsyth (jpforsyth.com)** Copyright: 2016 Jim Forsyth** License: MIT**** Description:** A MODx snippet for retrieving a MIGX TV value as a PHP array from a given resource.**** Options:** id: The resource ID (int)** name: The template variable name (string)** key: (Optional) The key to sort array by. Defaults to 'MIGX_id' (string)** placeholder: (Optional) The placeholder name. Defaults to 'migx' (string)**** Example (inside a snippet):** $modx->runSnippet('getMIGXtv',array(** 'id' => 123,** 'name' => `MY_MIGX_TV`** 'key' => `MIGX_id`,** 'placeholder' => `results`** ));** $results = $modx->getPlaceholder('results');***/