Histórico da Página
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
function beforeSocialLike(companyId, like){ if (like.getSociable().getText().toLowerCase().indexOf("#greve") > -1) { throw "You can not like a post that has this type of comment."; } } |
afterSocialLike
O evento é disparado após a efetivação de uma ação de "curtir" de um sociable.
Estrutura do Evento
Bloco de código | ||||
---|---|---|---|---|
| ||||
function afterSocialLike(companyId, like){
} |
Parâmetros da função
Propriedade | Descrição | Tipo |
---|---|---|
companyId | Código da Empresa | int |
like | Objeto com dados do sociable curtido | SocialLikeEventVO |
Exemplo Prático
Registrar em log para auditoria todas as publicações curtidas.
Exemplo de Implementação
Bloco de código | ||||
---|---|---|---|---|
| ||||
function afterSocialLike(companyId, like){
log.info(like.getUser() + " has liked the " + like.getSociable().getUrl());
} |
beforeSocialUnlike
O evento é disparado antes de ser efetivada uma ação de "descurtir" de um sociable.
Estrutura do Evento
Bloco de código | ||||
---|---|---|---|---|
| ||||
function beforeSocialUnlike(companyId, unlike){
} |
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas