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 | |
App::uses('AppModel', 'Model'); | |
/** | |
* Article Model | |
* | |
* @property Comment $Comment | |
*/ | |
class Article extends AppModel { | |
/** |
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 | |
namespace App\Controller; | |
use App\Controller\AppController; | |
use Cake\Event\Event; | |
use Cake\Mailer\MailerAwareTrait; | |
/** | |
* Bookmarks Controller |
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
diff --git a/src/ORM/Association.php b/src/ORM/Association.php | |
index b863ed8..38ddc7a 100644 | |
--- a/src/ORM/Association.php | |
+++ b/src/ORM/Association.php | |
@@ -839,8 +839,9 @@ abstract class Association | |
} | |
$newContain = []; | |
+ $aliasPrefix = isset($options['aliasPath']) ? $options['aliasPath'] . '.' : ''; | |
foreach ($contain as $alias => $value) { |
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 | |
namespace App\Model\Entity; | |
use Cake\ORM\Entity; | |
/** | |
* Car Entity | |
* | |
* @property string $id | |
* @property string $name |
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 | |
require './vendor/autoload.php'; | |
use Cake\Core\Configure; | |
use Cake\Http\ServerRequest; | |
use Cake\Routing\Router; | |
// Setup | |
define('CONFIG', __DIR__ . '/tests/test_app/config/'); | |
Configure::write('App', [ |
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 | |
namespace App\Test\Fixture; | |
use Cake\TestSuite\Fixture\TestFixture; | |
/** | |
* TimeSheetsFixture | |
* | |
*/ | |
class TimeSheetsFixture extends TestFixture |
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 | |
// This test method was added to the bottom of lib/Cake/TestCase/Model/Behavior/TreeBehaviorNumberTest.php | |
public function testSaveRecursiveTree() { | |
extract($this->settings); | |
$this->Tree = new $modelClass(); | |
$this->Tree->Behaviors->attach('Tree', array('level' => 'level')); | |
$this->completeTreeSave(array( | |
'app' => array( | |
'GroupPermissions' => array( |
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 | |
namespace App\Model\Behavior; | |
use Cake\ORM\Behavior; | |
class AlgoliaBehavior extends Behavior | |
{ | |
protected $_defaultConfig = [ | |
'index' => '', | |
// Other Algolia API key configuration |
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
diff --git a/src/ORM/Marshaller.php b/src/ORM/Marshaller.php | |
index e4a1894..f7c092b 100644 | |
--- a/src/ORM/Marshaller.php | |
+++ b/src/ORM/Marshaller.php | |
@@ -16,6 +16,7 @@ namespace Cake\ORM; | |
use ArrayObject; | |
use Cake\Collection\Collection; | |
+use Cake\Core\Configure; | |
use Cake\Database\Expression\TupleComparison; |
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 | |
// In config/bootstrap.php | |
use Cake\I18n\I18n; | |
use Cake\I18n\ChainMessagesLoader; | |
use Cake\I18n\MessagesFileLoader; | |
// Turn off 'default' as a fallback | |
I18n::translators()->useFallback(false); | |
// Create a custom fallback. |