How to add new page in pim section in oragehrm

309 Views Asked by At

How to add new page and show simple text and i need to add a link in menu too in pim section in oragehrm?Is it possible?I tried by adding new page like this.

Path : symfony/plugins/orangehrmPimPlugin/modules/pim/actions

viewtestDetailsAction.class.php
class viewMyDetails extends basePimAction {

    private $userService;

    /**
     * @param sfForm $form
     * @return
     */
    public function setForm(sfForm $form) {
        if (is_null($this->form)) {
            $this->form = $form;
        }
    }

     /**
     * Get ConfigService
     * @return ConfigService
     */
    public function getConfigService() {
        if (is_null($this->configService)) {
            $this->configService = new ConfigService();
        }
        return $this->configService;
    }

    public function execute($request) {

    } 



    protected function viewMyDetails() {


                $this->redirect('pim/viewtestDetails');




    }

}
symfony/plugins/orangehrmPimPlugin/modules/pim/templates
viewtestDetails.php
<?php

echo "teset";

?>

Am i doing wrong?or what to do step by step to add simple page in pim section

1

There are 1 best solutions below

0
Aruna Tebel On

I hope it is not too late to answer your question. What you have done is correct except for 2 small mistakes.

  1. Name of your action class should end with Action suffix. For eg: your viewMyDetails action class should be renamed to viewMyDetailsAction .
  2. Name of your success file should also followed by Success suffix. And also most importantly it should match your action name too! Therefore your success should be named as viewMyDetailsSuccess in this case.

Hope this helps!

EDIT

I see you redirect the request to another action. It is better if you can debug this issue by looking into the ../symfony/log/orangehrm.log further.