Skip to content

Instantly share code, notes, and snippets.

@dakota
Created October 7, 2014 06:55
Show Gist options
  • Select an option

  • Save dakota/2f95583f1b0ac0a64c42 to your computer and use it in GitHub Desktop.

Select an option

Save dakota/2f95583f1b0ac0a64c42 to your computer and use it in GitHub Desktop.
<?php
$assets = array(
'0' => array(
'Asset' => array(
'id' => '542273cb-2490-490d-b771-4ec767094594',
'name' => 'Congregations (Dashboard)',
'alias' => 'Congregations/dashboard',
'modified' => ''
),
'Group' => array(
array('id' => '54336b96-303c-4a9e-8ea1-76a267094594'), // System Administrator
array('id' => '5422c5b2-a518-453f-a0e5-2e6967094594'), // Super Administrator
array('id' => '5422c5cb-6214-41ac-aa69-43bb67094594'), // School Administrator
array('id' => '5422c5dc-08b0-4468-99a3-3dca67094594') // School Assistant
)
)
);
if($direction === 'up') {
$Asset = $this->generateModel('Asset');
$saveResult = $Asset->saveAll($assets);
return $saveResult;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment