English 中文(简体)
重写 Maage_ Core_ Block_ 摘要
原标题:Rewrite Mage_Core_Block_Abstract
  • 时间:2012-05-23 11:39:03
  •  标签:
  • php
  • magento

我想我已经知道答案了,但也许有一个很好的方法 重写类Mage_Core_Block_Abtract 而不直接在 Magento 框架中进行。

最佳回答

您可以在 Magento 重写课程的原因是, 您通过翻译层将您想要加载的类从 < code> countre/ template 转换为 < code>Mage_ Core_ Block_ Template , 例如 。

在代码中直接引用的抽象类不会通过此层, 例如 class Mage_Core_Block_Template sult Mage_Core_Block_Abstract {. /code> 。

如果您真的需要重新定义该类, 那么您需要将其放高一些, 如 < code> app/ copp/ local 文件夹中的文件夹。 I d d 重新评估您为什么这样做, 因为您可能采取了错误的方法, 或者说可能有一个更好的方法实现您想要的结果 。

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...