| @@ 49-62 (lines=14) @@ | ||
| 46 | /** |
|
| 47 | * @return void |
|
| 48 | */ |
|
| 49 | public static function enable() |
|
| 50 | { |
|
| 51 | Field::macro(self::MACRO_METHOD, function (Field $builder) { |
|
| 52 | return new static($builder->getClassMetadata(), $builder->getName()); |
|
| 53 | }); |
|
| 54 | ||
| 55 | ManyToOne::macro(self::MACRO_METHOD, function (ManyToOne $builder) { |
|
| 56 | return new static($builder->getClassMetadata(), $builder->getRelation()); |
|
| 57 | }); |
|
| 58 | ||
| 59 | ManyToMany::macro(self::MACRO_METHOD, function (ManyToMany $builder) { |
|
| 60 | return new static($builder->getClassMetadata(), $builder->getRelation()); |
|
| 61 | }); |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * Execute the build process |
|
| @@ 38-51 (lines=14) @@ | ||
| 35 | $this->fieldName = $fieldName; |
|
| 36 | } |
|
| 37 | ||
| 38 | public static function enable() |
|
| 39 | { |
|
| 40 | Field::macro(self::MACRO_METHOD, function (Field $builder) { |
|
| 41 | return new static($builder->getClassMetadata(), $builder->getName()); |
|
| 42 | }); |
|
| 43 | ||
| 44 | ManyToOne::macro(self::MACRO_METHOD, function (ManyToOne $builder) { |
|
| 45 | return new static($builder->getClassMetadata(), $builder->getRelation()); |
|
| 46 | }); |
|
| 47 | ||
| 48 | OneToOne::macro(self::MACRO_METHOD, function (OneToOne $builder) { |
|
| 49 | return new static($builder->getClassMetadata(), $builder->getRelation()); |
|
| 50 | }); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Execute the build process |
|