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 MyUserForm extends UserDefinedForm{ | |
private static $db = array( | |
'Template' => 'Enum("Template1","Template2","Template3")' | |
); | |
public funciton getCMSFields(){ | |
$fields = parent::getCMSFields(); |
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
(function($) { | |
$(.cms-container).entwine(function($) { | |
onmatch: function(){ | |
alert('Yay!!!'); | |
} | |
}); | |
}); |
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 CurrentLevel() { | |
$page = $this->owner; | |
$level = 1; | |
while(1) { | |
if($page->Parent) { | |
$level++; | |
$page = $page->Parent(); | |
}else { |
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 ProductTypeBrands(){ | |
//list to return | |
$brands = ArrayList::create(); | |
$addToBrands = function($product) use (&$brands){ | |
if(!$brands->find($product->BrandID)){ | |
$brands->push($Product->Brand());//Assuming the relation name for the has_one is Brand | |
} |
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
var $mycolumns = $('.casestudies .study'); | |
var height = 0; | |
$mycolumns.each(function () { | |
if ($(this).height() > height) { | |
height = $(this).height(); | |
} | |
}); | |
$mycolumns.height(height); |
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, ''); |
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
<? | |
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 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
<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 |