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 ModelAdminFilteredViewExtension extends DataExtension | |
{ | |
public function updateList(SS_List &$list) | |
{ | |
$list = $list->filter($this->getFilters()); | |
} |
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 | |
namespace MyProject; | |
use SilverStripe\GraphQL\Schema\Field\Query; | |
use SilverStripe\GraphQL\Schema\Interfaces\QueryPlugin; | |
use SilverStripe\GraphQL\Schema\Interfaces\SchemaUpdater; | |
use SilverStripe\GraphQL\Schema\Schema; |
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
#!/usr/bin/env php | |
<?php | |
$path = isset($argv[1]) ? $argv[1] : './'; | |
$isMinor = isset($argv[2]) && $argv[2] === '-m'; | |
$path = rtrim($path, '/') . '/'; | |
$lockFile = $path . 'composer.lock'; | |
if (!file_exists($lockFile)) { |
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 | |
namespace SilverStripe\Snapshots; | |
use SilverStripe\Core\Injector\Injectable; | |
use SilverStripe\ORM\Connect\Query; | |
use SilverStripe\ORM\Limitable; | |
use SilverStripe\ORM\Queries\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
<?php | |
namespace SilverStripe\GraphQL\Scaffolding\Scaffolders\CRUD; | |
use Exception; | |
use GraphQL\Type\Definition\InputObjectType; | |
use GraphQL\Type\Definition\ResolveInfo; | |
use SilverStripe\Core\ClassInfo; | |
use SilverStripe\GraphQL\Manager; | |
use SilverStripe\GraphQL\OperationResolver; |
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 GridFieldRegistry | |
{ | |
public function add($identifier, GridField $gridField) | |
{ | |
if ($identifierIsNotUnique) { throw... } | |
$this->registry[] = new GridFieldRegistration( | |
$identifier, |
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 Page_Controller extends ContentController | |
{ | |
public function init() | |
{ | |
parent::init(); | |
Requirements::javascript('framework/thirdparty/jquery/jquery.js'); | |
Requirements::javascript('themes/simple/javascript/script.js'); | |
} |
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 YourPage extends Page | |
{ | |
private static $has_one = [ | |
'Slideshow1' => 'Image', | |
'Slideshow2' => 'Image', | |
// etc.. | |
]; | |
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 GraphQLScaffolder | |
{ | |
const READ | |
const UPDATE | |
const DELETE | |
const CREATE | |
/** |
NewerOlder