0

Is there anything wrong with getting data directly from Block, and not from Model or resource? If yes, what are the threats? I mean, like this:

$block = Mage::app()->getLayout()
    ->getBlockSingleton('adminhtml/catalog_product_attribute_edit_tab_options');

$label = $block->getLabelValues();

Many thanks!!

1 Answer 1

1

Still working and have doubts on my answer.

Like I said before in the comments, you could also implement the underlaying functionality in your code. It is just a useful way of not having to copy/paste good code to another location.

In this case, the block has a lot of easy to use features to work with attribute options.

You could also try to understand the underlaying code in the block and implement it accordingly.

More than happy to help you out.

2
  • Cool, Mr Jeroen! Thanks! You have explained it quite well! Have you seen my new question?
    – Supersonic
    Mar 25, 2015 at 21:31
  • Which question?
    – Jeroen
    Mar 26, 2015 at 9:28

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.