Creating An IceHrm Extension

Here we introduce IceHrm extensions and cover the steps needed to create a basic extension.

Introduction #

IceHrm extensions allow developers to extend the features offered by IceHrm without changing the IceHrm core. Before going further let’s look into the structure of an IceHrm extension. IceHrm extensions live inside icehrm/extensions directory.

Each IceHrm extension has a directory with a unique name. Inside this directory, there should be one or two sub-extensions named admin or user (or both). If you want to make your extension available only to Administrators by default you only need the admin sub extension. But if you want employees also to be able to access it you will need to create an extension inside the user sub-extension.

Generating Extension Structure #

IceHrm provide a handy tool to generate the basic structure of an extension. After setting up the development environment, run the following command to generate a simple extension inside the root directory of IceHrm repository. (For now we will name our extension as “Kudos”)

php ice create:extension kudos admin

Now you should have a simple IceHrm extension inside icehrm/extensions/kudos.

If you log in to IceHrm development installation now as an admin, you should be able to see the Kudos Admin extension.

empty Kudos Admin extension

Powered by BetterDocs