-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accept read-only models in ModelChoiceList
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
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
27 changes: 27 additions & 0 deletions
27
src/Symfony/Bridge/Propel1/Tests/Fixtures/ReadOnlyItem.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* this file is part of the symfony package. | ||
* | ||
* (c) fabien potencier <fabien@symfony.com> | ||
* | ||
* for the full copyright and license information, please view the license | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bridge\Propel1\Tests\Fixtures; | ||
|
||
use \PropelPDO; | ||
|
||
class ReadOnlyItem extends \BaseObject | ||
{ | ||
public function getName() | ||
{ | ||
return 'Marvin'; | ||
} | ||
|
||
public function getPrimaryKey() | ||
{ | ||
return 42; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/Symfony/Bridge/Propel1/Tests/Fixtures/ReadOnlyItemQuery.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* this file is part of the symfony package. | ||
* | ||
* (c) fabien potencier <fabien@symfony.com> | ||
* | ||
* for the full copyright and license information, please view the license | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bridge\Propel1\Tests\Fixtures; | ||
|
||
class ReadOnlyItemQuery | ||
{ | ||
public function getTableMap() | ||
{ | ||
// Allows to define methods in this class | ||
// to avoid a lot of mock classes | ||
return $this; | ||
} | ||
|
||
public function getPrimaryKeys() | ||
{ | ||
return array('id'); | ||
} | ||
} |
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