1. Question:Discuss the format of Internal route in YII 

    Answer
    The format for a route is moduleID/controllerID/actionID. For example, the actionPage method of WebsiteController corresponds to the website/page route.    Page: 43






    1. Report
  2. Question:What’s the difference between renderPartial and render method when outputting view? 

    Answer
    CController::renderPartial does the same template processing as CController::render, except the former does not use layout. As we can access the current controller in a view using $this, we can use its renderPartialto use a view within another view.   Page: 68






    1. Report
  3. Question:Discuss the function of clips in YII. How to use clip? 

    Answer
    One of the Yii features you can use in your views is clips. The basic idea is that you can record some output and then reuse it later in a view.               
    Example: 
    <?php $this->beginClip('footer')?>
    This application was built with Yii.
    <?php $this->endClip()?>
    Page: 68-69






    1. Report
  4. Question:What is decorator in YII? 

    Answer
    we can enclose content into a decorator. The common usage of decorators is 
    Layout. Yes, when you are rendering a view using the render method of your controller, 
    Yii automatically decorates it with the main layout.    Page: 70






    1. Report
  5. Question:What are the advantages of managing assets in YII? 

    Answer
    An ability to manage assets is one of the greatest parts of Yii. It is especially useful in the following cases:
    1.	 When you want to implement an extension that stores its JavaScript, CSS, and images in its own folder that is not accessible from a browser.
    2.	When you need to pre-process your assets: combine JavaScript, compress it, and so on.
    3.	When you use assets multiple times per page and want to avoid duplicates.






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd