Ejemplo n.º 1
0
 /**
  * Obtiene la foto del propietario de un articulo
  * @return string
  */
 public function imagenPropietario()
 {
     return ImagenHelper::obtenerImagenPerfil($this->foto);
 }
Ejemplo n.º 2
0
use yii\helpers\Url;
use himiklab\thumbnail\EasyThumbnailImage;
use frontend\assets\UsuarioAsset;
use karpoff\icrop\CropImageUpload;
use common\components\ImagenHelper;
use common\extensions\cmsAB\mapaLocalizacion\MapLocalizacion;
/* @var $this yii\web\View */
/* @var $model */
/* @var $searchModel common\models\UsuariosBuscador */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->registerJsFile('libreria/plugins/crop/cropper.js', ['depends' => [UsuarioAsset::className()]]);
$this->registerJsFile('libreria/plugins/crop/main.js', ['depends' => [UsuarioAsset::className()]]);
$this->title = Yii::t('app', 'Mi Perfil');
$this->params['breadcrumbs'][] = $this->title;
$baseUrl = Yii::getAlias('@libreriaImg/');
$avatar = ImagenHelper::obtenerImagenPerfil($model->foto);
$inputOpciones = ['template' => "{input}\n{label}\n{hint}\n{error}\n", 'options' => ['class' => 'input-field']];
$inputRadioListOpciones = ['tag' => 'div', 'class' => 'col-sm-6', 'item' => function ($index, $label, $name, $checked, $value) {
    $seleccion = $checked == true ? 'checked' : '';
    $html = '<div class="radiobox checkbox-pink">
                 <input type="radio" name="' . $name . '" value="' . $value . '" ' . $seleccion . '>
                 <label class="radio-styled">' . $label . '</label>
                 </div>';
    return $html;
}, 'itemOptions' => ['labelOptions' => ['class' => 'radio-styled']]];
?>

<?php 
$identity = Yii::$app->getUser()->getIdentity();
if (isset($identity->perfil)) {
    VarDumper::dump($identity->perfil, 10, true);