简体   繁体   中英

when I am changing code in symfony its not reflecting in browser (orangehrm)

I am trying to change the code in the Orangehrm built under the symfony framework. My task is to change certain things in the attendance reports ie in attendance report all employees are shown including the past employess. I want that in daily atendance reports past employees should not come. I have made changes in the file name Attendancedao.php which is inside the folder

symfony/plugins/orangehrmattendanceplugin/lib/dao/attendancedao.php

I have made change in the funcion

 public function searchAttendanceRecords($employeeIds = null, $employeementStatus = null, $subDivision = null, $dateFrom = null , $dateTo = null )
 {

 }

there I have added a condition to not fetch employees having the termination id as not null.

but there is no change is reflected in the front end part of it. even for testing I had deleted the files completely but still project ran successfully. although I am sure these is the only file to make any changes in the needed situation. but if there is any change please suggest that too. I am assuming it is some cahce file from background rns that code. please suggest if there is any process to change or clear the cache so the changes are reflected in the front end.

indeed, you should not modify vendors files... There is a way to clear cache : delete app/cache content, or you in a terminal : $ php app/console cache:clear --env=prod (or --env=dev)

=> http://symfony.com/doc/current/cookbook/console/usage.html

There is another way to clear the cache in Orange. Delete the following folder after making a backup of orangehrm: OrangeHRM/symfony/cache/orangehrm . This folder and its contents will be regenerated with the current environment the next time you load orangeHRM in the web browser.

But I dont think this is the issue as I have made many changes to the LeaveRequestDao.php and other Dao files in the orangehrmLeavePlugin before and the changes where instant on front end.

Could you post the complete contents of the searchAttendanceRecords($emp...) function with your added code. Also, check the orangehrm.log. After doing the action that should call your new code check the log file for an error entry, its found in orangehrm/symfony.log. To see if your getting any error messages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM