This file contains hidden or 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 | |
$results = episode::getEpsThreeDays(date("Y-m-d 00:00:00", $startDate->format('U'))); | |
$list = ArrayList::create(); | |
foreach($results as $result){ | |
$arrayListItem = ArrayData::create($result); | |
$list->push($arrayListItem); | |
} |
This file contains hidden or 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 sendEmailToMembers() | |
{ | |
$sendEmail = function($member){ | |
$email = Email::create(); | |
$email->setTo($member->Email); | |
$email->setFrom('[email protected]'); |
This file contains hidden or 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 | |
/** | |
* assume $data['ID'] is an integer | |
* | |
* when the object is queried, it has the correct data. | |
* using both the method shown and $form->saveInto($school); | |
* the write() creates a new object rather than update the queried object | |
* | |
* @param $data |
This file contains hidden or 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 | |
/** | |
* @property string Title | |
* | |
* @method DataList|Member[] Youth | |
*/ | |
class School extends DataObject | |
{ |
This file contains hidden or 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 | |
class YourModelAdmin extends ModelAdmin{ | |
/** | |
* @return SearchContext | |
*/ | |
public function getSearchContext() | |
{ | |
$context = parent::getSearchContext(); |
This file contains hidden or 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
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAgAElEQVR4Xu2dC5RUxbX397yZ9wxvlaeiQYyPoAGyMKCY6+N+ENGrQFSMgSsmCx8k4ANFVESeIpFEicuIy0RFvTcmXIzGR0QUFRWVEDAQQUBEZIBhgAHm2fOtfzVn7Onpnu6ZOaenTu//WWvWwPTpOrVr79q/ql276qTU1dXVCS+2AFuALcAWYAuwBXzdAinxAL2iokKysrIkJSWlSWFra2ulurpa2rVr1+i+aGXg72lpaZKRkdHgO/g7rkhl+brFWXm2AFuALcAWYAt40AL1QMdEfcGCBXLddddJx44dzaO+/vprmTVrloE0YD5p0iTp27dvxGq899578tRTT5nPiouL5c4775SCgoKoZaDMuXPnyo4dO8x3Lr/8crnooosE9XjmmWfknXfeMX8/88wz5ec//7mkpqZ6ID6LZAuwBdgCbAG2QHK0gAH6rl27DMzLy8vlgQcekA4dOhiIT5kyRbp27Spjx441sAbgf/3rXzeaTe/cuVNmzJghw4YNk+9973uyaNEi6dmzpxkARCtj8eLFsmXLFrnlllvkww8/lBUrVsjUqVNl69at8vzzz8tPf/pTCQQC8oc//EFGjhwpl1xySXK0OKVgC7AF2AJsAbaABy2QEggE6iZPnmxm3mvXrjVgxgx906ZNsnDhQpkzZ44UFRVJWVmZ3HHHHQbQffr0aVCV//3f/5V3333XDAowk16zZo0sWbJEfvGLX8gjjzzSqIybbrpJHn30Ubn22mtl4MCBZlaOOgwdOlQ+/vhjOeGEE+SGG24wz0A5GDBMmzYtZsjfg/ZhkWwBtgBbgC3AFvBFC5gZ+uHDh81a9c033yz33XefAfpHH30kTz75pIExQudHjx41MMdsfdCgQQ2Ee+KJJ2T79u1y7733GqBv3LjRzORHjRolgH14GZdddpn5+8SJE+X00083QL/nnnukc+fO |
This file contains hidden or 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 | |
class My_Controller extends Page_Controller | |
{ | |
private static $allowed_actions = array( | |
'index', | |
'TestFunction', | |
); | |
This file contains hidden or 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
<? | |
class YourObjectTest extends FunctionalTest{ | |
public function testCanCreate(){ | |
$nullMember = Member::create(); | |
$nullMember->write(); | |
$this->assertTrue(singleton('YourObject')->canCreate($nullMember)); | |
$nullMember->delete(); | |
} |
This file contains hidden or 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 | |
class FileUpdateTask extends BuildTask{ | |
protected $title = 'File Update Task'; | |
protected $enabled = true; | |
protected $description = 'Update files from cloud files to normal'; | |
public function run($request){ |
This file contains hidden or 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 | |
// TinyMCE Config | |
$config = HtmlEditorConfig::get('cms'); | |
$config->disablePlugins('emotions', 'fullscreen'); | |
$config->setButtonsForLine(1, 'formatselect,separator,bullist,numlist, | |
separator,bold,italic,sup,sub,separator,sslink,unlink,anchor,separator,ssmedia,pasteword, | |
separator,spellchecker,undo,redo,code'); | |
$config->setButtonsForLine(2, 'tablecontrols'); | |
$config->setButtonsForLine(3, ''); |