db
AbstractBaseService Class Reference

Inherited by SimpleAdminServiceImpl.

Public Member Functions

 get ($id)
 
 changeSimpleProperty ($objectId, $propertyName)
 
 updateObjectPosition ($objId, $position)
 
 turnImage (DBObject $image, $method='getImage')
 
 updateImages (DBObject $obj, $method='getImages')
 
 deleteAllImages ($objectId)
 
 getImagesByFkId ($fkObjid, $tableName)
 

Public Attributes

 $dao
 
 $imageDao
 

Protected Member Functions

 createUniqueSlugInTable ($name, Dao $dao, $columnName='slug')
 
 makeDBConnection ()
 

Protected Attributes

 $pdo
 

Detailed Description

Base servis pro administraci - obsahuje metody vyuzivane AbstractBaseControllerem Obsahuje metody pro changeSimpleProperty dale metody pro praci s obrazky standartaně v db vazba 1:N

Member Function Documentation

◆ changeSimpleProperty()

changeSimpleProperty (   $objectId,
  $propertyName 
)

Slouzi k jednocuche zmene boolean vlastnosti Nejcasteji zmena aktivity zaznamu

Parameters
integer$objectId- id of updated object
string$propertyName- name of boolean property (atribute),

◆ createUniqueSlugInTable()

createUniqueSlugInTable (   $name,
Dao  $dao,
  $columnName = 'slug' 
)
protected

Make unique slug in table

Parameters
string$namestring from which I make slug
Dao$daoDao class of table
string$columnNamecolumn where is save slug string
Returns
string Slug

◆ deleteAllImages()

deleteAllImages (   $objectId)

Smaže všechny obrazky k danému objektu

  • !! Doporučuji tuto metodu obalit transakci !!!
    Parameters
    type$objectId- id objektu ke smazani

◆ get()

get (   $id)
abstract

Navratí daný objekt dle id

◆ getImagesByFkId()

getImagesByFkId (   $fkObjid,
  $tableName 
)

Return images by fk, in order by column position

Parameters
integer$fkObjidID of FK key
string$tableNameName of images table
Returns
array Array of images

◆ makeDBConnection()

makeDBConnection ( )
protected

make PDO connection

◆ turnImage()

turnImage ( DBObject  $image,
  $method = 'getImage' 
)

Otoci obrazek Turn image which DBobject contain

Parameters
DBObject$picture- object, ktery obsahuje obrazek ( DB object musi obsahovat atribut turn a metodu getTurn())
string$method- nazev metody ktere vrati obrazek z DBObjektu

◆ updateImages()

updateImages ( DBObject  $obj,
  $method = 'getImages' 
)

Metoda pro ukladani std. obrazku - save/update !! Doporučuji tuto metodu obalit transakci !!!

Parameters
DBObject$obj- $object which contain images
string$method- name of method to get images from $obj

◆ updateObjectPosition()

updateObjectPosition (   $objId,
  $position 
)

Update pozice objektu Update position of object

Parameters
integer$objId- id of object which you want to update, object have to contain atribute position and method set Position()
integer$position- position want i set

Member Data Documentation

◆ $dao

$dao

◆ $imageDao

$imageDao

◆ $pdo

$pdo
protected

The documentation for this class was generated from the following file: