CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • can't customized php file CRM\Core\OptionValue.php???
Pages: [1]

Author Topic: can't customized php file CRM\Core\OptionValue.php???  (Read 671 times)

nathw

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.6.14
  • CMS version: drupal 7
  • MySQL version: mysql5.5
  • PHP version: php5.5
can't customized php file CRM\Core\OptionValue.php???
March 24, 2016, 06:34:30 am
Hello,

I used CiviCRM 4.6.14 and  Drupal 7.43. I want to customize the file civicrm\CRM\Core\OptionValue.php to add a where condition in function getRows but it don't work. In debug we don't pass in the customized file but in the civicrm  core file. I've already customized CRM\Core\PseudoConstant.php or files in CRM\Core\BAO, CRM\Core\DAO and it works.
Is there a reason why OptionValue.php don't work?

Thanks,



Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: can't customized php file CRM\Core\OptionValue.php???
March 24, 2016, 07:35:20 am
You should really create an extension for this kind of stuff. It might be that your call is via the API etc. Just customizing core files is not recommended.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

nathw

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.6.14
  • CMS version: drupal 7
  • MySQL version: mysql5.5
  • PHP version: php5.5
Re: can't customized php file CRM\Core\OptionValue.php???
March 25, 2016, 02:04:20 am
Thanks.

I'll try to find documentation about extensions and see if I manage to do what i want with extensions.
But just a question how could we know when using extension or when using customized files?
Until now i only used customized files and it works quite fine.

Sorry if my english is too bad, I'm french.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: can't customized php file CRM\Core\OptionValue.php???
March 25, 2016, 02:57:31 am
We never use customized files. It gives you the biggest chance of upgrade problems, so we never do changes that way. We always create extensions :-)
By the way, this might be a better platform for this type of question: http://civicrm.stackexchange.com/
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

nathw

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.6.14
  • CMS version: drupal 7
  • MySQL version: mysql5.5
  • PHP version: php5.5
Re: can't customized php file CRM\Core\OptionValue.php???
March 25, 2016, 03:06:28 am
Thanks for replying.

 I'll look at your link.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • can't customized php file CRM\Core\OptionValue.php???

This forum was archived on 2017-11-26.