Skip to content

Commit

Permalink
Fix more occurrences of $_accessible
Browse files Browse the repository at this point in the history
Add the missing array typehint to other occurrences of $_accessible

Refs cakephp#7728
  • Loading branch information
markstory committed Sep 26, 2023
1 parent 3e334fc commit 5cb5512
Show file tree
Hide file tree
Showing 24 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions en/orm/entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ indicate whether a field can or cannot be mass-assigned::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true
];
Expand All @@ -386,7 +386,7 @@ fallback behavior if a field is not specifically named::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true,
'*' => false,
Expand Down
2 changes: 1 addition & 1 deletion en/orm/saving-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ an important caveat:
If a Product belongsToMany Tag::

// in the Product Entity
protected $_accessible = [
protected array $_accessible = [
// .. other properties
'tags' => true,
];
Expand Down
2 changes: 1 addition & 1 deletion en/tutorials-and-examples/blog-auth-example/auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Next, we'll create the ``User`` entity and add password hashing. Create the
class User extends Entity
{
// Make all fields mass assignable except for primary key field "id".
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false
];
Expand Down
2 changes: 1 addition & 1 deletion en/tutorials-and-examples/cms/tags-and-users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ can add a virtual/computed field to the entity. In
use Cake\Collection\Collection;

// Update the accessible property to contain `tag_string`
protected $_accessible = [
protected array $_accessible = [
//other fields...
'tag_string' => true
];
Expand Down
2 changes: 1 addition & 1 deletion es/tutorials-and-examples/blog-auth-example/auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Crea el archivo **src/Model/Entity/User.php** y agrega las siguientes lineas::
{

// Make all fields mass assignable for now.
protected $_accessible = ['*' => true];
protected array $_accessible = ['*' => true];

// ...

Expand Down
2 changes: 1 addition & 1 deletion es/tutorials-and-examples/bookmarks/part-two.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ entidad para poder 'guardarla' más adelante.
En **src/Model/Entity/Bookmark.php** añade ``tag_string`` a ``$_accessible`` de
este modo::

protected $_accessible = [
protected array $_accessible = [
'user_id' => true,
'title' => true,
'description' => true,
Expand Down
2 changes: 1 addition & 1 deletion es/tutorials-and-examples/cms/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ archivo completo debería verse así::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false,
'slug' => false,
Expand Down
4 changes: 2 additions & 2 deletions fr/orm/entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ d'indiquer s'ils peuvent être assignés en masse ou non. Les valeurs ``true`` e

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true
];
Expand All @@ -413,7 +413,7 @@ comportement par défaut si un champ n'est pas nommé spécifiquement::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true,
'*' => false,
Expand Down
2 changes: 1 addition & 1 deletion fr/orm/saving-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ belongsToMany, avec cependant un point d'attention important:
Si Product belongsToMany Tag::

// Dans l'entity Product
protected $_accessible = [
protected array $_accessible = [
// .. autres propriétés
'tags' => true,
];
Expand Down
2 changes: 1 addition & 1 deletion fr/tutorials-and-examples/blog-auth-example/auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ suit::
{

// Rend les champs assignables en masse sauf pour la clé primaire "id".
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false
];
Expand Down
2 changes: 1 addition & 1 deletion fr/tutorials-and-examples/bookmarks/part-two.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ entity, puisque nous voulons la 'sauvegarder' plus tard.
Dans le fichier **src/Model/Entity/Bookmark.php**, ajoutez ``tag_string`` à
la propriété ``_accessible`` comme ceci::

protected $_accessible = [
protected array $_accessible = [
'user_id' => true,
'title' => true,
'description' => true,
Expand Down
2 changes: 1 addition & 1 deletion fr/tutorials-and-examples/cms/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Le fichier devra ressembler à ceci::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false,
'slug' => false,
Expand Down
2 changes: 1 addition & 1 deletion fr/tutorials-and-examples/cms/tags-and-users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ entity, nous ajoutons un champ virtuel/pré-calculé pour l'entity. Dans
use Cake\Collection\Collection;

// Mettez à jour la propriété accessible pour qu'elle contienne `tag_string`
protected $_accessible = [
protected array $_accessible = [
//autres champs...
'tag_string' => true
];
Expand Down
4 changes: 2 additions & 2 deletions ja/orm/entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ CakePHP は一括代入から保護しません。

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true
];
Expand All @@ -333,7 +333,7 @@ CakePHP は一括代入から保護しません。

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true,
'*' => false,
Expand Down
2 changes: 1 addition & 1 deletion ja/orm/saving-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ hasMany の belongsToMany アソシエーションについても同じことが
もし、 Product belongsToMany Tag であれば、こうなります。 ::

// Product エンティティーの中で
protected $_accessible = [
protected array $_accessible = [
// .. 他のプロパティー
'tags' => true,
];
Expand Down
2 changes: 1 addition & 1 deletion ja/tutorials-and-examples/blog-auth-example/auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ composerを使ってAuthenticationプラグインをインストールします
class User extends Entity
{
// 主キーフィールドである「id」以外のすべてのフィールドを一括代入可能にします。
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false
];
Expand Down
2 changes: 1 addition & 1 deletion ja/tutorials-and-examples/bookmarks/part-two.rst
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ AppController に追加しましょう。 ::
**src/Model/Entity/Bookmark.php** で ``$_accessible`` に ``tag_string`` を
このように追加してください。 ::

protected $_accessible = [
protected array $_accessible = [
'user_id' => true,
'title' => true,
'description' => true,
Expand Down
2 changes: 1 addition & 1 deletion ja/tutorials-and-examples/cms/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Table オブジェクトを ``ArticlesTable`` と名付けることで、CakePHP

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false,
'slug' => false,
Expand Down
2 changes: 1 addition & 1 deletion ja/tutorials-and-examples/cms/tags-and-users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ CakePHP では、コントローラーのアクションをスリムに保ち、
use Cake\Collection\Collection;

// アクセス可能なプロパティに `tag_string` を含めるよう更新します
protected $_accessible = [
protected array $_accessible = [
// その他のフィールドも追加可能
'tag_string' => true
];
Expand Down
4 changes: 2 additions & 2 deletions pt/orm/entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ indicam se um campo pode ou não ser atribuído em massa::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true
];
Expand All @@ -313,7 +313,7 @@ de falbback se um campo não for especificamente nomeado::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'title' => true,
'body' => true,
'*' => false,
Expand Down
2 changes: 1 addition & 1 deletion pt/orm/saving-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ advertência importante:
Se um Produto pertence a várias (belongsToMany) Tag::

// Na classe da entidade Product
protected $_accessible = [
protected array $_accessible = [
// .. outras propriedades
'tags' => true,
];
Expand Down
2 changes: 1 addition & 1 deletion pt/tutorials-and-examples/blog-auth-example/auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ e adicione a seguinte trecho::
{

// Gera conjunto de todos os campos exceto o com a chave primária.
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false
];
Expand Down
2 changes: 1 addition & 1 deletion pt/tutorials-and-examples/bookmarks/part-two.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ propriedade ``tag_string`` a lista ``_accessible`` em sua entidade.
Em **src/Model/Entity/Bookmark.php** adicione o ``tag_string`` ao
``_accessible`` desta forma::

protected $_accessible = [
protected array $_accessible = [
'user_id' => true,
'title' => true,
'description' => true,
Expand Down
2 changes: 1 addition & 1 deletion pt/tutorials-and-examples/cms/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ com este::

class Article extends Entity
{
protected $_accessible = [
protected array $_accessible = [
'*' => true,
'id' => false,
'slug' => false,
Expand Down

0 comments on commit 5cb5512

Please sign in to comment.