Iam a newbie in magento. Coming to my question Iam wondering where this functions getChildHtml(),getCopyright() declared in magento.

  • I Cannot Understand Why Iam getting Downvotes as I already said Iam a newbie and whats wrong in knowing the things what I donno.
    – dh47
    Nov 10, 2014 at 12:05
  • 1
    I would assume, as a simple search over the source code would have answered this question, also a basic php knowledge should be enough to know where/how to find them
    – Flyingmana
    Nov 10, 2014 at 12:06
  • 2
    Most probably you get downvotes because you didn't explain what you tried so far, and because you question is kind of broad. If you expect someone to explain what each and every method does you're going to have a bad time. No one will do it, and if you find someone to do it, you will have to wait a few years until he writes a complete answer.
    – Marius
    Nov 10, 2014 at 12:07

2 Answers 2


getChildHtml is defined in Mage_Core_Block_Abstract and can be used in any class that extends it. This method returns you the html of a child block of the current block. Or an empty string if the child block does not exist.

getCopyright is defined in Mage_Page_Block_Html_Footer and returns you the value you set in System->Configuration->Design->Footer->Copyright.

For any other methods just do a search in the files.
You will see that some methods cannot be found but you can still call them. Those are magic methods and can be used through the magic of Varien_Object:__call().
Read this for more details.


getCopyright() is a function which is exiting on magento core file(Mage_Page_Block_Html_Footer) and it value id set from admin

code is

 public function getCopyright()
        if (!$this->_copyright) {
            $this->_copyright = Mage::getStoreConfig('design/footer/copyright');

        return $this->_copyright;

call to method getChildHtml() loads the HTML for the child block with the name which is passed to the method, so in this case we are looking for a child block named of name.

See at:


  • not only getCopyright() I wanna know about every function declaration
    – dh47
    Nov 10, 2014 at 12:01
  • then you need study on magento code and structure and basic logic. Magento is use setter and getter php function on this works.
    – Amit Bera
    Nov 10, 2014 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.