Skip to content

Design flaw in core URL helper #228

Closed
@witrin

Description

@witrin

Hi,

I think the implementation of the method Mage_Core_Helper_Url::getCurrentUrl() should be moved into the core URL model. In early versions you have used the core URL model for its implementation:

return $this->_getUrl('*/*/*', array('_current' => true, '_use_rewrite' => true));

Without knowing why you have changed this, but now it is very laborious to override its behaviour. This is because, the core URL helper is currently a base class for eight other helper classes.

Let's suppose you want to override how URLs are generated (e.g. to integrate Magento with TYPO3). Now you have to override the helper itself respectively its derivation beside the core URL model.

Thus I recommend to make the new implementation also be part of the core URL model. This should make it cleaner and more flexible.

If you agree with me, I would create a pull request for this issue.

Best regards,
Artus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions