mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: clearer distinction between class names and actual names
This commit is contained in:
parent
8e27a4f978
commit
d1fc27d03a
@ -34,7 +34,7 @@ class Team extends DataObject
|
|||||||
];
|
];
|
||||||
|
|
||||||
private static $has_many = [
|
private static $has_many = [
|
||||||
'Players' => 'Player'
|
'Players' => Player::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -97,13 +97,13 @@ use SilverStripe\ORM\DataObject;
|
|||||||
class Player extends DataObject
|
class Player extends DataObject
|
||||||
{
|
{
|
||||||
private static $has_many = [
|
private static $has_many = [
|
||||||
"Fans" => "Fan.FanOf"
|
"Fans" => Fan::class.".FanOf",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
class Team extends DataObject
|
class Team extends DataObject
|
||||||
{
|
{
|
||||||
private static $has_many = [
|
private static $has_many = [
|
||||||
"Fans" => "Fan.FanOf"
|
"Fans" => Fan::class.".FanOf",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,18 +146,18 @@ use SilverStripe\ORM\DataObject;
|
|||||||
class Team extends DataObject
|
class Team extends DataObject
|
||||||
{
|
{
|
||||||
private static $db = [
|
private static $db = [
|
||||||
'Title' => 'Varchar'
|
'Title' => 'Varchar',
|
||||||
];
|
];
|
||||||
|
|
||||||
private static $has_many = [
|
private static $has_many = [
|
||||||
'Players' => 'Player'
|
'Players' => Player::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
class Player extends DataObject
|
class Player extends DataObject
|
||||||
{
|
{
|
||||||
|
|
||||||
private static $has_one = [
|
private static $has_one = [
|
||||||
"Team" => "Team",
|
"Team" => Team::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -187,15 +187,15 @@ use SilverStripe\ORM\DataObject;
|
|||||||
class Person extends DataObject
|
class Person extends DataObject
|
||||||
{
|
{
|
||||||
private static $has_many = [
|
private static $has_many = [
|
||||||
"Managing" => "Company.Manager",
|
"Managing" => Company::class.".Manager",
|
||||||
"Cleaning" => "Company.Cleaner",
|
"Cleaning" => Company::class.".Cleaner",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
class Company extends DataObject
|
class Company extends DataObject
|
||||||
{
|
{
|
||||||
private static $has_one = [
|
private static $has_one = [
|
||||||
"Manager" => "Person",
|
"Manager" => Person::class,
|
||||||
"Cleaner" => "Person"
|
"Cleaner" => Person::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -231,14 +231,14 @@ class Team extends DataObject
|
|||||||
{
|
{
|
||||||
|
|
||||||
private static $has_one = [
|
private static $has_one = [
|
||||||
'Coach' => 'Coach'
|
'Coach' => Coach::class
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
class Coach extends DataObject
|
class Coach extends DataObject
|
||||||
{
|
{
|
||||||
|
|
||||||
private static $belongs_to = [
|
private static $belongs_to = [
|
||||||
'Team' => 'Team.Coach'
|
'Team' => Team::class.'.Coach'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -280,7 +280,7 @@ use SilverStripe\ORM\DataObject;
|
|||||||
class Team extends DataObject
|
class Team extends DataObject
|
||||||
{
|
{
|
||||||
private static $many_many = [
|
private static $many_many = [
|
||||||
"Supporters" => "Supporter",
|
"Supporters" => Supporter::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
private static $many_many_extraFields = [
|
private static $many_many_extraFields = [
|
||||||
@ -293,7 +293,7 @@ class Team extends DataObject
|
|||||||
class Supporter extends DataObject
|
class Supporter extends DataObject
|
||||||
{
|
{
|
||||||
private static $belongs_many_many = [
|
private static $belongs_many_many = [
|
||||||
"Supports" => "Team",
|
"Supports" => Team::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -465,16 +465,16 @@ class Category extends DataObject
|
|||||||
{
|
{
|
||||||
|
|
||||||
private static $many_many = [
|
private static $many_many = [
|
||||||
'Products' => 'Product',
|
'Products' => Product::class,
|
||||||
'FeaturedProducts' => 'Product'
|
'FeaturedProducts' => Product::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
class Product extends DataObject
|
class Product extends DataObject
|
||||||
{
|
{
|
||||||
private static $belongs_many_many = [
|
private static $belongs_many_many = [
|
||||||
'Categories' => 'Category.Products',
|
'Categories' => Category::class.'.Products',
|
||||||
'FeaturedInCategories' => 'Category.FeaturedProducts'
|
'FeaturedInCategories' => Category::class.'.FeaturedProducts',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -589,7 +589,7 @@ use SilverStripe\ORM\DataObject;
|
|||||||
class Team extends DataObject
|
class Team extends DataObject
|
||||||
{
|
{
|
||||||
private static $has_many = [
|
private static $has_many = [
|
||||||
"Players" => "Player"
|
"Players" => Player::class
|
||||||
];
|
];
|
||||||
|
|
||||||
public function ActivePlayers()
|
public function ActivePlayers()
|
||||||
|
Loading…
Reference in New Issue
Block a user