nerdexam
Magento

M70-201 · Question #1

Which two of the following will return an instance of a block object? (Choose two)

The correct answer is D. Mage::app()->getLayout()->createBlock('page/html_header'); F. Mage::app()->getLayout()->createBlock('page/html_header')- >setTemplate('page/html/header=phtml'). See the full explanation below for the reasoning.

Question

Which two of the following will return an instance of a block object? (Choose two)

Options

  • AMage::getBlock('page/html_header');
  • BMage::app()->createBlock('page/html_header');
  • CMage::createBlock('page/html_header');
  • DMage::app()->getLayout()->createBlock('page/html_header');
  • EMage::getLayout()->createBlock('page/html_header');
  • FMage::app()->getLayout()->createBlock('page/html_header')- >setTemplate('page/html/header=phtml');

How the community answered

(13 responses)
  • A
    8% (1)
  • B
    15% (2)
  • D
    77% (10)

Community Discussion

No community discussion yet for this question.

Full M70-201 Practice