services

Standardize OrangeHRM service layer logic placement and Symfony DI registration.

1.1k|746|Updated Jan 5, 2017
One-click install
npx skills add https://github.com/orangehrm/orangehrm --skill services-orangehrm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: services
Source: https://github.com/orangehrm/orangehrm/tree/main/.agents/skills/services
Command: npx skills add https://github.com/orangehrm/orangehrm --skill services-orangehrm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the common problem of developers incorrectly placing business logic in the wrong layer of OrangeHRM's three-tier backend, leading to messy, hard-to-maintain code that violates project conventions.

Core Features & Use Cases

  • Logic Placement Guidance: Clear rules for what belongs in a service vs a DAO or entity decorator, eliminating guesswork when implementing new features.
  • Standard Pattern Reference: Canonical patterns for service registration, lazy-getter dependency composition, and service trait access used across the entire OrangeHRM codebase.
  • Use Case: When building a new employee onboarding feature, use this Skill to correctly implement multi-step save logic in a service, register it in your plugin configuration, and access it from API endpoints without breaking existing conventions.

Quick Start

Use the services skill to implement the business logic for a new employee onboarding feature, register it correctly in your plugin configuration, and access it from API endpoints following OrangeHRM's service layer conventions.

Frequently Asked Questions about services

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure business logic in an OrangeHRM plugin service layer?

To structure business logic in an OrangeHRM plugin service layer, place multi-step save logic and complex operations within dedicated services rather than DAOs or entity decorators to maintain consistent three-tier backend conventions.

How do I register a new service in an OrangeHRM plugin configuration?

Register a new service in an OrangeHRM plugin configuration by defining it within the Symfony dependency injection container, ensuring it follows standardized service registration patterns for proper API endpoint access.

What is the correct pattern for dependency composition in OrangeHRM services?

The correct pattern for dependency composition in OrangeHRM services utilizes lazy-getter dependency patterns and service trait access conventions, ensuring standardized and efficient retrieval of dependencies across the codebase.

When should business logic go into a service versus a DAO in Symfony backend development?

Business logic belongs in a service when implementing multi-step operations or complex rules, while a DAO should strictly handle data access, ensuring proper separation of concerns within the three-tier architecture.

Can I use Symfony DI container features for OrangeHRM service registration?

Yes, OrangeHRM service registration relies on Symfony DI container features, applying standardized lazy-getter dependency patterns and plugin configuration rules to correctly expose services to API endpoints.