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!!

Marius
199k55 gold badges431 silver badges837 bronze badges
asked Mar 8, 2015 at 18:47

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.

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.