src/Application.php
public function __async_getCount($materialFieldId)
    {
        // @var array $result Result of asynchronous controller
        $response = array('status' => 1);
        // Getting quantity from DB by param materialFieldId
        $response['count'] = $this->query
            ->entity(CMS::MATERIAL_IMAGES_RELATION_ENTITY)
            ->where(MaterialField::F_PRIMARY, $materialFieldId)
            ->count();

        return $response;
    }
public function __async_getCount($materialFieldId)
    {
        // @var array $result Result of asynchronous controller
        $response = array('status' => 1);
        // Getting quantity from DB by param materialFieldId
        $response['count'] = $this->query
            ->entity(CMS::MATERIAL_IMAGES_RELATION_ENTITY)
            ->where(MaterialField::F_PRIMARY, $materialFieldId)
            ->count();

        return $response;
    }
public function __async_getCount ( $ materialFieldId ) { // @var array $result Result of asynchronous controller $ response = array ( 'status' => 1 ) ; // Getting quantity from DB by param materialFieldId $ response [ 'count' ] = $ this -> query -> entity ( CMS :: MATERIAL_IMAGES_RELATION_ENTITY ) -> where ( MaterialField :: F_PRIMARY , $ materialFieldId ) -> count ( ) ; return $ response ; }
Controller for getting quantity image in gallery.

@param integer $materialFieldId identefier Table MaterialField
@return array Async response array with additional param count.
Controller for getting quantity image in gallery .