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 Vendor\Plugin | |
use Event; | |
use Vendor\Plugin\Models\MyModel; | |
use Vendor\Plugin\Controllers\MyController; | |
class Plugin | |
{ | |
public function boot() | |
{ |
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 | |
function onHandle() { | |
Flash::success('test'); | |
} | |
?> | |
== | |
{# Doesn't work because no 'data-request' or 'data-request-flash' is set on the containing form #} | |
{{ form_open() }} |
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
/** | |
* Group messages by thread id pulling message and thread ids from the provided $queryScopes Query object | |
* | |
* @param QueryBuilder $query QueryBuilder object to apply the scope to | |
* @param QueryBuilder $queryScopes QueryBuilder object to use to get the message ids from | |
* @return QueryBuilder $query | |
*/ | |
public function scopeGroupedByThread($query, $queryScopes = null) | |
{ | |
$queryScopes = $queryScopes ?: $this->newQuery(); |
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
StaffMembersController::extendFormFields(function($form, $model, $context) { | |
if (!$model instanceof StaffMemberModel) { | |
return; | |
} | |
// Get the model's profile, including any that may have been deferred already | |
$profile = $model->profile()->withDeferred($form->getSessionKey())->first(); | |
// If the profile object for this user doesn't exist yet, then create it and add it via deferred binding if necessary | |
if (!$profile) { |
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
<div class="profile-square"> | |
<h2 class="profile-title">{{ data.title }}</h2> | |
<div class="profile-description">{{ data.description }}</div> | |
<img class="profile-image" src="{{ data.image | media }}"> | |
</div> |
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
/* | |
|------------------ | |
| Extend Richeditor | |
|------------------ | |
*/ | |
+function ($) { | |
var Plugins = { | |
init: function () { | |
$.FroalaEditor.DefineIcon('buttonIcon', {NAME: 'star'}); | |
$.FroalaEditor.RegisterCommand('myButton', { |
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 LukeTowers\Examples\Components; | |
use Config; | |
use Cms\Classes\Theme; | |
use Cms\Classes\ComponentBase; | |
use RainLab\Pages\Classes\Page as StaticPage; | |
class StaticPage extends ComponentBase | |
{ |
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
/bootstrap/compiled.php | |
/vendor | |
composer.phar | |
.DS_Store | |
.idea | |
.env | |
.env.*.php | |
.env.php | |
php_errors.log | |
nginx-error.log |
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
$data = array_dot(\Lang::get('iacea.exchanges::lang')); | |
$options = []; | |
/* | |
* Parse options | |
*/ | |
$defaultOptions = [ | |
'firstRowTitles' => true, | |
'useOutput' => false, | |
'fileName' => 'export.csv', |
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
# Setup symlinks in local development copy of Winter to the local development copy of Winter.Workshop | |
ln -s ~/LocalRepositories/WinterCMS/Themes/Winter/Workshop ~/LocalRepositories/WinterCMS/Core/winter/themes/workshop | |
# Setup external symlink (for mac, outside of vagrant) to the local development copies of my plugins | |
ln -s ~/Repositories/WinterCMS/Themes/Winter/Workshop ~/Repositories/WinterCMS/Core/winter/themes/workshop-src | |
# Setup symlinks in local development copy of Winter to the local development copies of my plugins | |
ln -s ~/LocalRepositories/WinterCMS/Plugins ~/LocalRepositories/WinterCMS/Core/winter/plugins | |
# Setup external symlink (for mac, outside of vagrant) to the local development copies of my plugins |
OlderNewer