Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Accounts
  • Actions
  • ApiKeys
  • Backup
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CouponTerms
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • EmailVerifications
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • MessageGroups
  • Messages
  • MessengerManager
  • ModuleClientMeta
  • ModuleManager
  • ModuleTypes
  • Navigation
  • PackageGroups
  • PackageOptionGroups
  • PackageOptions
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • Pricings
  • ReportManager
  • ServiceChanges
  • ServiceInvoices
  • Services
  • Settings
  • Staff
  • StaffGroups
  • States
  • SystemEvents
  • Taxes
  • Themes
  • Transactions
  • Users
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class CalendarEvents

CalendarEvents

Model
Extended by AppModel uses Blesta\Core\Util\Common\Traits\Container
Extended by CalendarEvents
Package: blesta\app\models
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/calendar_events.php
Methods summary
public
# __construct( )

Initialize the CalendarEvents

Initialize the CalendarEvents

Overrides

AppModel::__construct()
public integer
# add( array $vars )

Adds a calendar event

Adds a calendar event

Parameters

$vars

An array of calendar event data including:

  • company_id The ID of the company to add this event under
  • staff_id The ID of the staff member that created this event
  • shared Whether or not this event is shared among other staff members of this company (true to share false otherwise, default false)
  • title The title of the event
  • url The URL to link this event to (optional, default null)
  • start_date The start date of the event
  • end_date The end date of the event
  • all_day Whether or not this event spans the entire day of the start/end dates (default false)

Returns

integer
The ID of the calendar event created, void on error
public
# edit( integer $calendar_event_id, array $vars )

Updates a calendar event

Updates a calendar event

Parameters

$calendar_event_id
The ID of the calendar event to update
$vars

An array of calendar event data including (only parameters submitted will be updated):

  • company_id The ID of the company to add this event under
  • staff_id The ID of the staff member that created this event (required)
  • shared Whether or not this event is shared among other staff members of this company (true to share false otherwise)
  • title The title of the event
  • url The URL to link this event to
  • start_date The start date of the event
  • end_date The end date of the event
  • all_day Whether or not this event spans the entire day of the start/end dates
public
# delete( integer $calendar_event_id )

Deletes a calendar event

Deletes a calendar event

Parameters

$calendar_event_id
The ID of the calendar event to delete
public mixed
# get( integer $calendar_event_id )

Fetches a calendar event

Fetches a calendar event

Parameters

$calendar_event_id
The ID of the calendar event to fetch

Returns

mixed
A stdClass object representing the calendar event, false if no such event exists
public array
# getAll( integer $company_id, integer $staff_id, string $start_date, string $end_date, boolean $include_shared = true )

Fetches all of events that begin between the given start and end dates

Fetches all of events that begin between the given start and end dates

Parameters

$company_id
The ID of the company to fetch for
$staff_id
The ID of the staff member to fetch for
$start_date
Defines the lower bound for event start dates
$end_date
Defines the upper bound for event start dates
$include_shared

If true will include shared calendar events, false will only include events for this staff member

Returns

array
An array of stdClass objects, each representing a calendar event

See

CalendarEvents::getRange()
public array
# getRange( integer $company_id, integer $staff_id, string $start_date, string $end_date, boolean $include_shared = true )

Fetches a set of events that begin or end between the given start and end dates (e.g. exist between the given start and end dates).

Fetches a set of events that begin or end between the given start and end dates (e.g. exist between the given start and end dates).

Parameters

$company_id
The ID of the company to fetch for
$staff_id
The ID of the staff member to fetch for
$start_date
Defines the lower bound for event start/end dates
$end_date
Defines the upper bound for event start/end dates
$include_shared

If true will include shared calendar events, false will only include events for this staff member

Returns

array
An array of stdClass objects, each representing a calendar event

See

CalendarEvents::getAll()
public boolean
# validateStaffEvent( integer $staff_id, integer $event_id )

Validates whether the given event belongs to the given staff member

Validates whether the given event belongs to the given staff member

Parameters

$staff_id
The ID of the staff member that created this event
$event_id
The ID of the calendar event created

Returns

boolean
True if the calendar event belongs to the given staff member, false otherwise
public
# validateDateOrder( string $start_date, string $end_date )

Validates that the given start date is before the given end date, inclusive

Validates that the given start date is before the given end date, inclusive

Parameters

$start_date
The start date
$end_date
The end date
Methods inherited from AppModel
_(), boolToInt(), currencyToDecimal(), dateToUtc(), errors(), getPerPage(), ifSet(), loadCrypto(), setDefaultIfEmpty(), setPerPage(), setRulesIfSet(), strToBool(), systemDecrypt(), systemEncrypt(), systemHash(), truncateDecimal(), validateExists(), validateStateCountry()
Methods used from Blesta\Core\Util\Common\Traits\Container
getFromContainer()
Properties inherited from AppModel
$logger, $replacement_keys
Blesta API documentation generated by ApiGen