for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Renders the MPAA rating for a media item
*
* @author Sam Stenvall <[email protected]>
* @copyright Copyright © Sam Stenvall 2013-
* @license https://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
*/
class MPAARating extends CWidget
{
* @var string the rating
public $rating;
* Runs the widget
public function run()
// MPAA rating is not always available
if ($this->rating)
echo '<p>'.Yii::t('Media', 'MPAA rating').': '.$this->rating.'</p>';
}