Class app\controllers\PostsController
| Inheritance | app\controllers\PostsController » yii\web\Controller | 
|---|
Clase PostsController
Public Methods
| Method | Description | Defined By | 
|---|---|---|
| actionAceptar() | Acepta aquellos posts que estan en moderación | app\controllers\PostsController | 
| actionDelete() | Deletes an existing Post model. | app\controllers\PostsController | 
| actionGenerador() | Acción para el generador de posts el cual obtiene la ruta de todas las imagenes y se las manda a la vista | app\controllers\PostsController | 
| actionGeneradorCrear() | Cuando se selecciona una imagen con la que generar un meme se le pasara dicho fichero a la vista generador-crear | app\controllers\PostsController | 
| actionIndex() | List all Post models | app\controllers\PostsController | 
| actionModerar() | Lists all Post models that need moderation. | app\controllers\PostsController | 
| actionRechazar() | Rechaza aquellos posts que estan en moderación | app\controllers\PostsController | 
| actionSearch() | Realiza la busqueda por titulo de los Posts | app\controllers\PostsController | 
| actionSearchAjax() | Acción que lleva a cabo la busqueda del post por titulo mediante ajax | app\controllers\PostsController | 
| actionUpdate() | Updates an existing Post model. | app\controllers\PostsController | 
| actionUpload() | Creates a new Post model. | app\controllers\PostsController | 
| actionView() | Displays a single Post model. | app\controllers\PostsController | 
| actionVotar() | Realiza la votación de un post | app\controllers\PostsController | 
| behaviors() | app\controllers\PostsController | 
Protected Methods
| Method | Description | Defined By | 
|---|---|---|
| findModel() | Finds the Post model based on its primary key value. | app\controllers\PostsController | 
Method Details
Acepta aquellos posts que estan en moderación
| public mixed actionAceptar ( $id ) | ||
| $id | integer | Id del post a aceptar | 
Deletes an existing Post model.
If deletion is successful, the browser will be redirected to the 'index' page.
| public mixed actionDelete ( $id ) | ||
| $id | integer | |
Acción para el generador de posts el cual obtiene la ruta de todas las imagenes y se las manda a la vista
| public mixed actionGenerador ( ) | 
Cuando se selecciona una imagen con la que generar un meme se le pasara dicho fichero a la vista generador-crear
| public mixed actionGeneradorCrear ( $fichero ) | ||
| $fichero | string | Nombre del fichero | 
List all Post models
| public mixed actionIndex ( $categoria = null ) | ||
| $categoria | string | Categoria a buscar | 
Lists all Post models that need moderation.
| public mixed actionModerar ( ) | 
Rechaza aquellos posts que estan en moderación
| public mixed actionRechazar ( $id ) | ||
| $id | integer | Id del post a aceptar | 
Realiza la busqueda por titulo de los Posts
| public mixed actionSearch ( $q = null ) | ||
| $q | string | La cadena que correspondera con la busqueda del titulo | 
Acción que lleva a cabo la busqueda del post por titulo mediante ajax
| public mixed actionSearchAjax ( $q = null ) | ||
| $q | string | Cadena a buscar titulo | 
Updates an existing Post model.
If update is successful, the browser will be redirected to the 'view' page.
| public mixed actionUpdate ( $id ) | ||
| $id | integer | |
Creates a new Post model.
If creation is successful, the browser will be redirected to the 'view' page.
| public mixed actionUpload ( ) | 
Displays a single Post model.
| public mixed actionView ( $id ) | ||
| $id | integer | |
Realiza la votación de un post
| public integer actionVotar ( $id, $positivo ) | ||
| $id | integer | Id del post | 
| $positivo | boolean | Si es o no positivo | 
| return | integer | Numero total de votos (resta positivos - negativos) | 
|---|---|---|
| public void behaviors ( ) | 
Finds the Post model based on its primary key value.
If the model is not found, a 404 HTTP exception will be thrown.
| protected app\models\Post findModel ( $id ) | ||
| $id | integer | |
| return | app\models\Post | The loaded model | 
|---|---|---|
| throws | \yii\web\NotFoundHttpException | if the model cannot be found |