Class Socialveo\WebApi\Controllers\StaticPagesController

InheritanceSocialveo\WebApi\Controllers\StaticPagesController » Socialveo\WebApi\Controllers\RestApiController » Phalcon\Mvc\Controller
Uses TraitsSocialveo\Core\Translatable

Class StaticPagesController

Public Methods

Hide inherited methods

MethodDescriptionDefined By
_handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
_t() Gets translations Socialveo\Core\Translatable
afterExecuteRoute() After execute route, change return value to json Socialveo\WebApi\Controllers\RestApiController
beforeExecuteRoute() Before execute route, remove extra params Socialveo\WebApi\Controllers\RestApiController
checkClientCredentials() Checks client credentials Socialveo\WebApi\Controllers\RestApiController
decrypt() Decrypt value Socialveo\WebApi\Controllers\RestApiController
encrypt() Encrypt value Socialveo\WebApi\Controllers\RestApiController
getArrayFromParam() Returns array from params Socialveo\WebApi\Controllers\RestApiController
getLanguage() Gets language code Socialveo\WebApi\Controllers\RestApiController
getPageAction() Get static page Socialveo\WebApi\Controllers\StaticPagesController
getParams() Gets request params for Socialveo::filteredFind() Socialveo\WebApi\Controllers\RestApiController
getRequestData() Returns request data Socialveo\WebApi\Controllers\RestApiController
getRequiredParam() Get required param Socialveo\WebApi\Controllers\RestApiController
getToken() Get token Socialveo\WebApi\Controllers\RestApiController
getTranslation() Gets translations Socialveo\WebApi\Controllers\RestApiController
handleError() Handle errors Socialveo\WebApi\Controllers\RestApiController
handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
initialize() Initialize controller Socialveo\WebApi\Controllers\RestApiController
invalidMethodAction() Action trigger when invalid action tried run Socialveo\WebApi\Controllers\RestApiController
listAction() Get static pages Socialveo\WebApi\Controllers\StaticPagesController
notFoundAction() Not found action Socialveo\WebApi\Controllers\RestApiController
posts() Gets posts Socialveo\WebApi\Controllers\RestApiController
replaceParam() Replace param Socialveo\WebApi\Controllers\RestApiController
respondWithItem() Response with item // * @deprecated Socialveo\WebApi\Controllers\RestApiController
sendJsonContent() Send response as json content and exit Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRaw() Send json content Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRawStatic() Send json content static Socialveo\WebApi\Controllers\RestApiController
setDefaultParam() Set default option Socialveo\WebApi\Controllers\RestApiController
t() Gets translations Socialveo\Core\Translatable
unsetParam() Unset get param Socialveo\WebApi\Controllers\RestApiController

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
checkAccess() Checks during the init of controller whether user is a guest. Socialveo\WebApi\Controllers\RestApiController
log() Log full request data for debug Socialveo\WebApi\Controllers\RestApiController
objectsToArray() Convert objects to arrays Socialveo\WebApi\Controllers\RestApiController

Method Details

getPageAction() public method

Get static page

/static-pages/{page}

Method: GET

Access: Public

Parameters:

{page} required string static page slug
{language} optional string language

Returns: StaticPages

Sample response:

{
    "status": "OK",
    "data":{
        "type": "static_pages",
        "uuid": "837aecf3-d344-11b6-944c-675b35bc2b11",
        "slug": "about",
        "content": "<p class=\"lead\"> Welcome to Socialveo, the world's most powerful social network. </p> <p class=\"lead\"> Socialveo is a social network that unites people all over the world and helps them communicate comfortably and promptly. At any given moment Socialveo aims to be the most modern, fastest and attractive way of communication in the network. </p> <p class=\"lead\"> Our mission is simple: To connect the world's people to make them more united. When you join Socialveo, you get access to people, news, updates, and more that help you stay always updated. </p>",
        "title": "About Socialveo",
        "cover_image": "",
        "language": "en_US",
        ...
    },
    "timestamp": 1234567890
}

public mixed getPageAction ( $page )
$page
listAction() public method

Get static pages

/static-pages

Method: GET

Access: Public

Parameters:

page or offset optional integer page start or offset
limit optional integer page limit
sortby[property]=order optional array sort by property value, order either desc or asc
filterby[property][operator]=value optional array filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), ne(<>), like
embed optional mixed allows to include one or more child resource(s) in the response
uuids optional array or string list of item UUIDs to fetch, array or string separated by commas. when used, no other parameters can be utilized

Filter by: StaticPages

Returns: StaticPages []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "static_pages", "uuid": "8632dc31-a7b8-12e6-2c4c-294b333b2cea", "slug": "contact",…},
        {"type": "static_pages", "uuid": "1632dc32-a7b8-11e6-2c4d-695b35bb2ce1", "slug": "privacy-policy",…},
        {"type": "static_pages", "uuid": "1635dc32-c7b8-11e6-2c4d-685b35ba2be9", "slug": "terms-service",…},
        {"type": "static_pages", "uuid": "236adcf2-d243-11b5-964c-575b35bc2b19", "slug": "faq",…},
        {"type": "static_pages", "uuid": "837aecf3-d344-11b6-944c-675b35bc2b11", "slug": "about",…}
        ...
    ],
    "count":{ "offset": 0, "limit": 10, "total": 12 },
    "timestamp": 1234567890
}

public mixed listAction ( )