Skip to content

Conversation

@IvanLutokhin
Copy link
Contributor

No description provided.

Comment on lines 135 to 139
public function checkAccess(): bool
{
throw new \LogicException('Method should be implemented');
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Его можно сделать абстрактным. Таким образом я кидал исключения для методов которые можно реализовать или не реализовать (например save, его в некоторых модулях нет), а этот метод вполне можно сделаьт обязательным

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сделал обязательным для реализации

Comment on lines 16 to 30
private const REQUIRED_METHODS = [
'/api/integration-modules/{code}',
'/api/integration-modules/{code}/edit',
'/api/delivery/generic/setting/{code}',
'/api/delivery/generic/setting/{code}/edit',
'/api/delivery/generic/{code}/tracking',
'/api/delivery/shipments',
'/api/delivery/shipments/{id}',
'/api/delivery/shipments/create',
'/api/delivery/shipments/{id}/edit',
'/api/reference/sites',
'/api/reference/stores',
'/api/reference/payment-types',
'/api/reference/statuses',
];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

С этим проблема - не всем модулям нужны все эти методы, некоторые модули работают только на трекинг например, в некоторых не реализована передача сеттингов и не нужен доступ к спаровчникам и т.д.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Перенес список обязательных методов в аннотацию RetailCrmAccess

Ivan Lutokhin and others added 5 commits August 18, 2020 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants