This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function getEntryJson(EntryModel $entry) | |
{ | |
$entryData = array(); | |
foreach ($entry->getType()->getFieldLayout()->getFields() as $field) | |
{ | |
$field = $field->getField(); | |
$handle = $field->handle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get the entry | |
$entry = craft()->entries->getEntryById(100); | |
// Define the new Matrix data | |
$matrixData = array( | |
'1' => array( // '1' is an existing block ID | |
'type' => 'text', // 'text' is the block type handle | |
'enabled' => true, |