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 | |
class Client extends DataObject { | |
public static $db = array ( | |
"FirstName" => "Text", | |
"LastName" => "Text", | |
"Email" => "Text", | |
"PhoneNumber" => "Varchar(9)", | |
"YearOfBirth" => "Varchar(4)", |
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
function tag() { | |
if ($this->owner->request->param('Action') == 'tag' && $this->owner->request->param('OtherID') == "rss") { | |
$entries = $this->owner->Entries(20, Convert::raw2xml($this->owner->request->latestParam('ID'))); | |
if($entries) { | |
$rss = new RSSFeed($entries, $this->owner->Link('rss'), ($blogName ? $blogName : $altBlogName), "", "Title", "RSSContent"); | |
return $rss->outputToBrowser(); | |
} | |
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 | |
$galleryManagerConfig | |
->removeComponentsByType('GridFieldDataColumns') | |
->removeComponentsByType('GridFieldSortableHeader') | |
->removeComponentsByType('GridFieldAddExistingAutocompleter') | |
->removeComponentsByType('GridFieldPaginator') | |
->removeComponentsByType('GridFieldPageCount') | |
->addComponents( | |
new GridFieldTitleHeader(), | |
new GridFieldOrderableRows(), |
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 | |
class TranslatableBlockPage extends DataExtension { | |
/** | |
* Simple support for Translatable, when a page is translated, copy all content blocks and relate to translated page | |
* Apply to Pages | |
*/ | |
public function onTranslatableCreate() { | |
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 | |
class CMSBatchActions_TranslateTo extends CMSBatchAction { | |
public function getActionTitle() { | |
return _t('CMSBatchActions.TRANSLATETO', 'Translate to...'); | |
} | |
public function run(SS_List $pages) { |
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 | |
/** | |
* Controller to process translate pages batch action. | |
* | |
* @package batchactionsplus | |
*/ | |
class CMSBatchAction_TransalteToController extends LeftAndMain { | |
private static $url_segment = 'batchtranslateto'; |
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
/*jslint browser: true, nomen: true, white: true */ | |
/** | |
* Javascript to process extra batch actions. Currently deals with the TranslateTo action | |
*/ | |
(function($) { | |
'use strict'; | |
$.entwine('ss.tree', function($){ |
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
public function onAfterWrite() | |
{ | |
parent::onAfterWrite(); | |
if ($this->hasExtension('FilesystemPublisher')) { | |
$this->republish($this); | |
} | |
$currentPage = Controller::curr()->getRequest()->requestVar('CMSMainCurrentPageID'); | |
// Check if Block is Used on Current Page and has a Sort of 0 | |
$query = new SQLSelect(); |
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
add_filter('vc_google_fonts_get_fonts_filter','custom_fonts'); | |
// $font_list from js_composer/include/params/google_fonts/google_fonts.php | |
function custom_fonts( $fonts_list ) { | |
$fonts_list = array(); | |
$open_sans = new stdClass(); | |
$open_sans->font_family = 'Open Sans'; | |
$open_sans->font_styles = '300,300italic,regular,italic,600,600italic,700,700italic,800,800italic'; |
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 | |
use DNADesign\ElementalList\Model\ElementList; | |
class SectionElement extends ElementList | |
{ | |
private static $db = [ | |
'FullWidth' => 'Boolean' | |
]; | |
private static $controller_template = 'NoElementHolder'; |
OlderNewer