Bitrix-D7 22.6
 
Загрузка...
Поиск...
Не найдено
Класс Block
+ Граф наследования:Block:

Открытые члены

 __construct ($id, $data=[], array $params=[])
 
 exist ()
 
 getId ()
 
 getLandingId ()
 
 getSiteId ()
 
 getCode ()
 
 getLocalAnchor ()
 
 getContent ()
 
 getBlockClass ()
 
 setAllowedByTariff (bool $mark)
 
 resetContent ()
 
 isActive ()
 
 isPublic ()
 
 isDesigned ()
 
 getAccess ()
 
 setAccess ($letter)
 
 setActive ($active)
 
 getRepoId ()
 
 getSite ()
 
 getPreview ()
 
 getError ()
 
 getManifest ($extended=false, $missCache=false, array $params=array())
 
 getAsset ($type=null)
 
 getCSS ()
 
 getJS ()
 
 getExt ()
 
 getClass ()
 
 view ($edit=false, \Bitrix\Landing\Landing $landing=null, array $params=array())
 
 saveAssets (array $assets)
 
 getAssets ()
 
 saveContent (string $content, $designed=false)
 
 save (array $additionalFields=[])
 
 changeLanding ($lid)
 
 changeFavoriteMeta (array $meta)
 
 unlink ()
 
 markDeleted ($mark)
 
 setSort ($sort)
 
 setAnchor ($anchor)
 
 saveSort ($sort)
 
 getSort ()
 
 getDynamicParams ($id=null)
 
 saveDynamicParams (array $sourceParams=[], array $params=[])
 
 clearDynamic ()
 
 getRuntimeRequiredUserAction ()
 
 setRuntimeRequiredUserAction (array $action)
 
 getDom ($clear=false)
 
 getMeta ()
 
 adjustCards ($selector, $count, &$changed=false)
 
 cloneCard ($selector, $position, $content='')
 
 setCardContent ($selector, $position, $content)
 
 getCardContent ($selector, $position)
 
 getCardCount ($selector)
 
 removeCard ($selector, $position)
 
 changeNodeName ($data)
 
 updateNodes ($data, $additional=array())
 
 updateCards (array $data=array())
 
 setClasses ($data)
 
 setAttributes ($data)
 

Открытые статические члены

static fillLanding (Landing $landing, $limit=0, array $params=array())
 
static cloneForEdit (\Bitrix\Landing\Landing $landing)
 
static publicationBlocks (\Bitrix\Landing\Landing $landing)
 
static getLandingIdByBlockId ($id)
 
static getLandingRowByBlockId ($id, array $select=array('ID'))
 
static getRowByBlockId ($id, array $select=array('ID'))
 
static getContentFromRepository (string $code, string $namespace=null)
 
static createFromRepository (Landing $landing, string $code, array $data=array())
 
static clearRepositoryCache ()
 
static getRepository ($withManifest=false)
 
static getLastUsed (int $count=15)
 
static markAsUsed (string $blockCode)
 
static removeAsUsed (string $blockCode)
 
static getStyle ()
 
static getSemantic ()
 
static getAttrs ()
 
static getBlockContent ($id, $editMode=false, array $params=array())
 
static getAnchor ($id)
 
static getManifestFile ($code)
 
static deleteByCode ($code)
 
static deleteAll ($lid)
 
static search ($query, array $filter=[], array $select=['LID'], array $group=['LID'])
 
static add ($fields)
 
static update ($id, $fields=array())
 
static delete ($id)
 
static getFavorites (?string $tplCode)
 
static getList ($fields=array())
 
static isContains (int $blockId, string $needed)
 
- Открытые статические члены унаследованные от BaseTable
static callback ($code, $callback)
 

Открытые атрибуты

const BLOCKS_DIR = 'blocks'
 
const BLOCKS_TAG = 'landing_blocks'
 
const PREVIEW_FILE_NAME = 'preview.jpg'
 
const CSS_FILE_NAME = 'style.css'
 
const JS_FILE_NAME = 'script.js'
 
const REPO_MASK = '/^repo_([\d]+)$/'
 
const NEW_BLOCK_LT = 1209600
 
const ACCESS_A = 'A'
 
const ACCESS_D = 'D'
 
const ACCESS_V = 'V'
 
const ACCESS_W = 'W'
 
const ACCESS_X = 'X'
 
const CARD_SYM_CODE = 'card'
 
const PRESET_SYM_CODE = 'preset'
 
const DEFAULT_WRAPPER_STYLE = ['block-default']
 

Статические открытые данные

static $internalClass = 'BlockTable'
 
- Статические открытые данные унаследованные от BaseTable
static $internalClass = null
 

Защищенные члены

 getTypeClass ($type)
 
 parseManifest ()
 
 checkDesignedManifest (array $manifest)
 
 localizationManifest (array &$manifest, array $lang)
 
 includeBlockClass ($path)
 
 setDynamic ($edit)
 
 getMenuHtml ($data, $manifestNode, $level='root')
 
 removeStyle (DOM\Node $node, array $styleToRemove)
 

Защищенные статические члены

static getNormalizedBlock (string $code)
 
static isNewBlock ($block)
 
static getGeneralPaths ()
 
static getNamespaces ()
 
static getSpecialManifest (string $type)
 
static getBlockNamespace ($code)
 
static getBlockPath ($code, $namespace=null)
 
static getMessageBlock ($params, $template='')
 
static collectAllowedAttrs (array $mixed, array &$allowed, $selector=null)
 
static replaceMetaMarkers ($content)
 
static getAjaxInitiatedAssets ()
 

Защищенные данные

 $id = 0
 
 $lid = 0
 
 $parentId = 0
 
 $siteId = 0
 
 $sort = 0
 
 $repoId = 0
 
 $repoInfo = []
 
 $code = ''
 
 $anchor = ''
 
 $content = ''
 
 $runtimeRequiredUserAction = []
 
 $access = 'X'
 
 $metaData = array()
 
 $assets = array()
 
 $active = false
 
 $landingActive = false
 
 $deleted = false
 
 $designed = false
 
 $public = false
 
 $allowedByTariff = true
 
 $docRoot = ''
 
 $error = null
 
 $dynamicParams = []
 
 $allowedExtensions
 

Подробное описание

См. определение в файле block.php строка 20

Конструктор(ы)

◆ __construct()

__construct (   $id,
  $data = [],
array  $params = [] 
)

Constructor.

Аргументы
int$idBlock id.
array$dataData row from BlockTable (by default get from DB).
array$paramsSome additional params.

См. определение в файле block.php строка 262

Методы

◆ add()

static add (   $fields)
static

Add block row.

Аргументы
array$fieldsBlock data.
Возвращает
\Bitrix\Main\Result

См. определение в файле block.php строка 5452

◆ adjustCards()

adjustCards (   $selector,
  $count,
$changed = false 
)

Adjust cards count by selector.

Аргументы
string$selectorSelector.
int$countNeeded cards count.
bool&$changedChanged.
Возвращает
boolean Success or failure.

См. определение в файле block.php строка 3914

◆ changeFavoriteMeta()

changeFavoriteMeta ( array  $meta)

Set meta information for favorite block.

Аргументы
array$metaMeta information.
Возвращает
bool

См. определение в файле block.php строка 3122

◆ changeLanding()

changeLanding (   $lid)

Change landing of current block.

Аргументы
int$lidNew landing id.
Возвращает
boolean

См. определение в файле block.php строка 3098

◆ changeNodeName()

changeNodeName (   $data)

Set new names for nodes of block.

Аргументы
array$dataNodes data array.
Возвращает
boolean

См. определение в файле block.php строка 4221

◆ checkDesignedManifest()

checkDesignedManifest ( array  $manifest)
protected

Checks that current block are designed and adds new manifest parts.

Аргументы
array$manifestCurrent manifest.
Возвращает
array

См. определение в файле block.php строка 2026

◆ clearDynamic()

clearDynamic ( )

Make block not dynamic.

Возвращает
void

См. определение в файле block.php строка 3845

◆ clearRepositoryCache()

static clearRepositoryCache ( )
static

Clear cache repository.

Возвращает
void

См. определение в файле block.php строка 886

◆ cloneCard()

cloneCard (   $selector,
  $position,
  $content = '' 
)

Clone one card in block by selector.

Аргументы
string$selectorSelector.
int$positionCard position.
string$contentNew content for cloned card.
Возвращает
boolean Success or failure.

См. определение в файле block.php строка 3971

◆ cloneForEdit()

static cloneForEdit ( \Bitrix\Landing\Landing  $landing)
static

Create copy of blocks for draft version.

Аргументы
\Bitrix\Landing\Landing$landingLanding instance.
Возвращает
void

См. определение в файле block.php строка 457

◆ collectAllowedAttrs()

static collectAllowedAttrs ( array  $mixed,
array &  $allowed,
  $selector = null 
)
staticprotected

Collects and returns allowed attributes ([selector] => [data-test, data-test2]).

Аргументы
string$selectorSelector, if attr have't own selector.
array&$allowedArray for collecting.
Возвращает
void

См. определение в файле block.php строка 4833

◆ createFromRepository()

static createFromRepository ( Landing  $landing,
string  $code,
array  $data = array() 
)
static

Create instance by string code.

Аргументы
Landing$landingLanding - owner for new block.
string$codeCode of block from repository.
array$dataAdditional data array.
Возвращает
Block|false

См. определение в файле block.php строка 695

◆ delete()

static delete (   $id)
static

Delete block row.

Аргументы
int$idPrimary key.
Возвращает
\Bitrix\Main\Result

См. определение в файле block.php строка 5497

◆ deleteAll()

static deleteAll (   $lid)
static

Delete all blocks for the landing.

Аргументы
int$lidLanding id.
Возвращает
void

См. определение в файле block.php строка 5104

◆ deleteByCode()

static deleteByCode (   $code)
static

Delete all blocks from db by codes.

Аргументы
array$codeArray of codes to delete.
Возвращает
void

См. определение в файле block.php строка 5069

◆ exist()

exist ( )

Exist or not block in current instance.

Возвращает
boolean

См. определение в файле block.php строка 1758

◆ fillLanding()

static fillLanding ( Landing  $landing,
  $limit = 0,
array  $params = array() 
)
static

Fill landing with blocks.

Аргументы
Landing$landingLanding instance.
int$limitLimit count for blocks.
array$paramsAdditional params.
Возвращает
boolean

См. определение в файле block.php строка 362

◆ getAccess()

getAccess ( )

Get current access.

Возвращает
string

См. определение в файле block.php строка 1893

◆ getAjaxInitiatedAssets()

static getAjaxInitiatedAssets ( )
staticprotected

In ajax hit may be initiated some assets (JS extensions), but will not be added on page. We need get them all and add to output.

Возвращает
array
Исключения

Bitrix\Main\ArgumentNullException

Исключения

Bitrix\Main\ArgumentOutOfRangeException

См. определение в файле block.php строка 5562

◆ getAnchor()

static getAnchor (   $id)
static

Get block anchor.

Аргументы
int$idBlock id.
Возвращает
string

См. определение в файле block.php строка 1673

◆ getAsset()

getAsset (   $type = null)

Get some assets of block.

Аргументы
string$typeWhat return: css, js, ext, class.
Возвращает
array

См. определение в файле block.php строка 2387

◆ getAssets()

getAssets ( )

Returns the block assets.

Возвращает
array

См. определение в файле block.php строка 3019

◆ getAttrs()

static getAttrs ( )
static

Returns blocks attrs manifests from repository.

Возвращает
array

См. определение в файле block.php строка 1507

◆ getBlockClass()

getBlockClass ( )

Get class of block.

Возвращает
LandingBlock

См. определение в файле block.php строка 1821

◆ getBlockContent()

static getBlockContent (   $id,
  $editMode = false,
array  $params = array() 
)
static

Get block content array.

Аргументы
int$idBlock id.
boolean$editModeEdit mode if true.
array$paramsSome params.
Возвращает
array

См. определение в файле block.php строка 1562

◆ getBlockNamespace()

static getBlockNamespace (   $code)
staticprotected

Get namespace for block.

Аргументы
string$codeCode of block.
Возвращает
string

См. определение в файле block.php строка 1683

◆ getBlockPath()

static getBlockPath (   $code,
  $namespace = null 
)
staticprotected

Get local path for block.

Аргументы
string$codeCode of block.
string$namespaceNamespace (optional).
Возвращает
string

См. определение в файле block.php строка 1728

◆ getCardContent()

getCardContent (   $selector,
  $position 
)

Gets card content from block by selector.

Аргументы
string$selectorSelector.
int$positionCard position.
Возвращает
string

См. определение в файле block.php строка 4122

◆ getCardCount()

getCardCount (   $selector)

Gets count of cards from block by selector.

Аргументы
string$selectorSelector.
Возвращает
int

См. определение в файле block.php строка 4145

◆ getClass()

getClass ( )

Get executable classes.

Возвращает
array

См. определение в файле block.php строка 2553

◆ getCode()

getCode ( )

Get code of the block.

Возвращает
string

См. определение в файле block.php строка 1794

◆ getContent()

getContent ( )

Get content of the block.

Возвращает
string

См. определение в файле block.php строка 1812

◆ getContentFromRepository()

static getContentFromRepository ( string  $code,
string  $namespace = null 
)
static

Get content from repository by code.

Аргументы
string$codeBlock code.
string | null$namespaceNamespace (optional).
Возвращает
string|null

См. определение в файле block.php строка 637

◆ getCSS()

getCSS ( )

Get css file path, if exists.

Возвращает
array

См. определение в файле block.php строка 2526

◆ getDom()

getDom (   $clear = false)

Load current content in DOM html structure.

Аргументы
bool$clearCLear static cache.
Возвращает
DOM\Document

См. определение в файле block.php строка 3873

◆ getDynamicParams()

getDynamicParams (   $id = null)

Gets dynamic source params.

Аргументы
int$idNot current block id.
Возвращает
array

См. определение в файле block.php строка 3256

◆ getError()

getError ( )

Get error collection

Возвращает
\Bitrix\Landing\Error

См. определение в файле block.php строка 1980

◆ getExt()

getExt ( )

Get extensions.

Возвращает
array

См. определение в файле block.php строка 2544

◆ getFavorites()

static getFavorites ( ?string  $tplCode)
static

Returns all favorites blocks.

Аргументы
string | null$tplCodePage template code.
Возвращает
array

См. определение в файле block.php строка 5519

◆ getGeneralPaths()

static getGeneralPaths ( )
staticprotected

Gets general paths, where blocks can be found.

Возвращает
array

См. определение в файле block.php строка 863

◆ getId()

getId ( )

Get id of the block.

Возвращает
int

См. определение в файле block.php строка 1767

◆ getJS()

getJS ( )

Get js file path, if exists.

Возвращает
array

См. определение в файле block.php строка 2535

◆ getLandingId()

getLandingId ( )

Gets landing id.

Возвращает
int

См. определение в файле block.php строка 1776

◆ getLandingIdByBlockId()

static getLandingIdByBlockId (   $id)
static

Recognize landing id by block id.

Аргументы
int | array$idBlock id (id array).
Возвращает
int|array|false

См. определение в файле block.php строка 519

◆ getLandingRowByBlockId()

static getLandingRowByBlockId (   $id,
array  $select = array('ID') 
)
static

Gets row by block id.

Аргументы
int | array$idBlock id (id array).
array$selectSelect row.
Возвращает
int|array|false

См. определение в файле block.php строка 554

◆ getLastUsed()

static getLastUsed ( int  $count = 15)
static

Returns last used blocks by current user.

Аргументы
int$countCount of blocks.
Возвращает
array

См. определение в файле block.php строка 1407

◆ getList()

static getList (   $fields = array())
static

Gets block's rows.

Аргументы
array$fieldsBlock orm data.
Возвращает
\Bitrix\Main\DB\Result

См. определение в файле block.php строка 5538

◆ getLocalAnchor()

getLocalAnchor ( )

Get anchor of the block.

Возвращает
string

См. определение в файле block.php строка 1803

◆ getManifest()

getManifest (   $extended = false,
  $missCache = false,
array  $params = array() 
)

Get manifest array from block.

Аргументы
bool$extendedGet extended manifest.
bool$missCacheDon't save in static cache.
array$paramsAdditional params.
Возвращает
array

См. определение в файле block.php строка 2072

◆ getManifestFile()

static getManifestFile (   $code)
static

Get manifest array as is from block.

Аргументы
string$codeCode name, format "namespace:code" or just "code".
Возвращает
array

См. определение в файле block.php строка 2350

◆ getMenuHtml()

getMenuHtml (   $data,
  $manifestNode,
  $level = 'root' 
)
protected

Returns menu html with child submenu.

Аргументы
array$dataData array.
array$manifestNodeManifest node for current selector.
string$levelLevel (root or children).
Возвращает
string

См. определение в файле block.php строка 4439

◆ getMessageBlock()

static getMessageBlock (   $params,
  $template = '' 
)
staticprotected

Gets message string.

Аргументы
array$paramsComponent's params.
string$templateTemplate name.
Возвращает
string

См. определение в файле block.php строка 2609

◆ getMeta()

getMeta ( )

Get metadata of current block.

Возвращает
array

См. определение в файле block.php строка 3902

◆ getNamespaces()

static getNamespaces ( )
staticprotected

Gets all available namespaces.

Возвращает
array

См. определение в файле block.php строка 898

◆ getNormalizedBlock()

static getNormalizedBlock ( string  $code)
staticprotected

Returns normalized block data.

Аргументы
string$codeBlock code.
Возвращает
array|null

См. определение в файле block.php строка 596

◆ getPreview()

getPreview ( )

Get preview picture of the block.

Возвращает
string

См. определение в файле block.php строка 1966

◆ getRepoId()

getRepoId ( )

Get repo id, if block from repo.

Возвращает
int

См. определение в файле block.php строка 1934

◆ getRepository()

static getRepository (   $withManifest = false)
static

Get blocks from repository.

Аргументы
bool$withManifestGet repo with manifest files of blocks.
Возвращает
array

См. определение в файле block.php строка 952

◆ getRowByBlockId()

static getRowByBlockId (   $id,
array  $select = array('ID') 
)
static

Gets landing row by block id.

Аргументы
int | array$idBlock id (id array).
array$selectSelect row.
Возвращает
int|array|false

См. определение в файле block.php строка 565

◆ getRuntimeRequiredUserAction()

getRuntimeRequiredUserAction ( )

Gets only runtime required actions.

Возвращает
array

См. определение в файле block.php строка 3854

◆ getSemantic()

static getSemantic ( )
static

Returns blocks semantic manifests from repository.

Возвращает
array

См. определение в файле block.php строка 1498

◆ getSite()

getSite ( )

Gets site row.

Возвращает
array

См. определение в файле block.php строка 1943

◆ getSiteId()

getSiteId ( )

Gets site id (of landing).

Возвращает
int

См. определение в файле block.php строка 1785

◆ getSort()

getSort ( )

Get sort of current block.

Возвращает
int

См. определение в файле block.php строка 3246

◆ getSpecialManifest()

static getSpecialManifest ( string  $type)
staticprotected

Returns blocks style manifest from repository.

Возвращает
array

См. определение в файле block.php строка 1516

◆ getStyle()

static getStyle ( )
static

Returns blocks style manifests from repository.

Возвращает
array

См. определение в файле block.php строка 1489

◆ getTypeClass()

getTypeClass (   $type)
protected

Get class handler for type of node.

См. также
Node\Type::getClassName
Аргументы
string$typeType.
Возвращает
string

См. определение в файле block.php строка 1994

◆ includeBlockClass()

includeBlockClass (   $path)
protected

Include class of block.

Аргументы
string$pathPath of block class.
Возвращает
\Bitrix\Landing\LandingBlock

См. определение в файле block.php строка 2563

◆ isActive()

isActive ( )

Active or not the block.

Возвращает
boolean

См. определение в файле block.php строка 1866

◆ isContains()

static isContains ( int  $blockId,
string  $needed 
)
static

Returns true if block's content contains needed string.

Аргументы
int$blockIdBlock id.
string$neededString for search.
Возвращает
bool

См. определение в файле block.php строка 5610

◆ isDesigned()

isDesigned ( )

Returns true if block was designed by user.

Возвращает
bool

См. определение в файле block.php строка 1884

◆ isNewBlock()

static isNewBlock (   $block)
staticprotected

New or not the block.

Аргументы
string$blockBlock code.
Возвращает
boolean

См. определение в файле block.php строка 824

◆ isPublic()

isPublic ( )

Public or not the block.

Возвращает
boolean

См. определение в файле block.php строка 1875

◆ localizationManifest()

localizationManifest ( array &  $manifest,
array  $lang 
)
protected

Localize manifest.

Аргументы
array$manifestManifest array.
array$langLang array.
Возвращает
void

См. определение в файле block.php строка 2327

◆ markAsUsed()

static markAsUsed ( string  $blockCode)
static

Stores block by code as last used.

Аргументы
string$blockCodeBlock code.
Возвращает
void

См. определение в файле block.php строка 1436

◆ markDeleted()

markDeleted (   $mark)

Mark delete or not current block.

Аргументы
boolean$markMark.
Возвращает
void

См. определение в файле block.php строка 3161

◆ parseManifest()

parseManifest ( )
protected

Returns additional manifest nodes from content.

Возвращает
array

См. определение в файле block.php строка 2003

◆ publicationBlocks()

static publicationBlocks ( \Bitrix\Landing\Landing  $landing)
static

Publication blocks for landing.

Аргументы
\Bitrix\Landing\Landing$landingLanding instance.
Возвращает
void

См. определение в файле block.php строка 509

◆ removeAsUsed()

static removeAsUsed ( string  $blockCode)
static

Removes block by code from last used.

Аргументы
string$blockCodeBlock code.
Возвращает
void

См. определение в файле block.php строка 1469

◆ removeCard()

removeCard (   $selector,
  $position 
)

Remove one card from block by selector.

Аргументы
string$selectorSelector.
int$positionCard position.
Возвращает
boolean Success or failure.

См. определение в файле block.php строка 4163

◆ removeStyle()

removeStyle ( DOM\Node  $node,
array  $styleToRemove 
)
protected

Recursive styles remove in Node.

Аргументы
\Bitrix\Main\Web\DOM\Node$nodeNode for clear.
array$styleToRemoveArray of styles to remove.
Возвращает
\Bitrix\Main\Web\DOM\Node

См. определение в файле block.php строка 4642

◆ replaceMetaMarkers()

static replaceMetaMarkers (   $content)
staticprotected

Replace title and breadcrumb marker in the block.

Аргументы
string$contentSome content.
Возвращает
string

См. определение в файле block.php строка 5011

◆ resetContent()

resetContent ( )

Reset content of current block.

Возвращает
void

См. определение в файле block.php строка 1846

◆ save()

save ( array  $additionalFields = [])

Save current block in DB.

Аргументы
array$additionalFieldsAdditional fields for saving.
Возвращает
boolean

См. определение в файле block.php строка 3058

◆ saveAssets()

saveAssets ( array  $assets)

Save assets to the block.

Аргументы
array$assetsNew assets array.
Возвращает
void

См. определение в файле block.php строка 2989

◆ saveContent()

saveContent ( string  $content,
  $designed = false 
)

Set new content.

Аргументы
string$contentNew content.
bool$designedContent was designed.
Возвращает
void

См. определение в файле block.php строка 3030

◆ saveDynamicParams()

saveDynamicParams ( array  $sourceParams = [],
array  $params = [] 
)

Save dynamic params for the block.

Аргументы
array$sourceParamsSource params.
array$paramsAdditional params.
Возвращает
void

См. определение в файле block.php строка 3318

◆ saveSort()

saveSort (   $sort)

Save new sort to current block to DB.

Аргументы
int$sortNew sort.
Возвращает
void

См. определение в файле block.php строка 3225

◆ search()

static search (   $query,
array  $filter = [],
array  $select = ['LID'],
array  $group = ['LID'] 
)
static

Search in blocks.

Аргументы
string$queryQuery string.
array$filterFilter array.
array$selectSelect fields.
array$groupGroup fields.
Возвращает
array

См. определение в файле block.php строка 5427

◆ setAccess()

setAccess (   $letter)

Set new access to the block.

Аргументы
string$letterAccess letter.
Возвращает
void

См. определение в файле block.php строка 1903

◆ setActive()

setActive (   $active)

Set active to the block.

Аргументы
boolean$activeBool: true or false.
Возвращает
boolean

См. определение в файле block.php строка 1916

◆ setAllowedByTariff()

setAllowedByTariff ( bool  $mark)

Marks block as allowed or not by tariff.

Аргументы
bool$markMark.
Возвращает
void

См. определение в файле block.php строка 1837

◆ setAnchor()

setAnchor (   $anchor)

Set new anchor to current block.

Аргументы
string$anchorNew anchor.
Возвращает
boolean

См. определение в файле block.php строка 3189

◆ setAttributes()

setAttributes (   $data)

Set attributes to nodes of block.

Аргументы
array$dataAttrs data array.
Возвращает
void

См. определение в файле block.php строка 4915

◆ setCardContent()

setCardContent (   $selector,
  $position,
  $content 
)

Set card content from block by selector.

Аргументы
string$selectorSelector.
int$positionCard position.
string$contentNew content.
Возвращает
boolean Success or failure.

См. определение в файле block.php строка 4081

◆ setClasses()

setClasses (   $data)

Set new classes to nodes of block.

Аргументы
array$dataClasses data array.
Возвращает
boolean

См. определение в файле block.php строка 4673

◆ setDynamic()

setDynamic (   $edit)
protected

Build dynamic content for the block.

Аргументы
bool$editEdit mode.
Возвращает
void

См. определение в файле block.php строка 3367

◆ setRuntimeRequiredUserAction()

setRuntimeRequiredUserAction ( array  $action)

Set only runtime required actions.

Аргументы
array$action

См. определение в файле block.php строка 3863

◆ setSort()

setSort (   $sort)

Set new sort to current block.

Аргументы
int$sortNew sort.
Возвращает
void

См. определение в файле block.php строка 3179

◆ unlink()

unlink ( )

Delete current block.

Возвращает
boolean

См. определение в файле block.php строка 3136

◆ update()

static update (   $id,
  $fields = array() 
)
static

Update block row.

Аргументы
int$idPrimary key.
array$fieldsBlock data.
Возвращает
\Bitrix\Main\Result

См. определение в файле block.php строка 5475

◆ updateCards()

updateCards ( array  $data = array())

Change cards multiple.

Аргументы
array$dataArray with cards.
Возвращает
boolean

См. определение в файле block.php строка 4523

◆ updateNodes()

updateNodes (   $data,
  $additional = array() 
)

Set new content to nodes of block.

Аргументы
array$dataNodes data array.
array$additionalAdditional prams for save.
Возвращает
boolean

См. определение в файле block.php строка 4264

◆ view()

view (   $edit = false,
\Bitrix\Landing\Landing  $landing = null,
array  $params = array() 
)

Out the block.

Аргументы
boolean$editOut block in edit mode.
Landing | null$landingLanding of this block.
array$paramsSome params.
Возвращает
void

См. определение в файле block.php строка 2631

Данные класса

◆ $access

$access = 'X'
protected

См. определение в файле block.php строка 174

◆ $active

$active = false
protected

См. определение в файле block.php строка 192

◆ $allowedByTariff

$allowedByTariff = true
protected

См. определение в файле block.php строка 222

◆ $allowedExtensions

$allowedExtensions
protected
Инициализатор
= [
'landing_form',
'landing_carousel',
'landing_google_maps_new',
'landing_map',
'landing_countdown',
'landing_gallery_cards',
'landing_chat'
]

См. определение в файле block.php строка 246

◆ $anchor

$anchor = ''
protected

См. определение в файле block.php строка 155

◆ $assets

$assets = array()
protected

См. определение в файле block.php строка 186

◆ $code

$code = ''
protected

См. определение в файле block.php строка 149

◆ $content

$content = ''
protected

См. определение в файле block.php строка 161

◆ $deleted

$deleted = false
protected

См. определение в файле block.php строка 204

◆ $designed

$designed = false
protected

См. определение в файле block.php строка 210

◆ $docRoot

$docRoot = ''
protected

См. определение в файле block.php строка 228

◆ $dynamicParams

$dynamicParams = []
protected

См. определение в файле block.php строка 240

◆ $error

$error = null
protected

См. определение в файле block.php строка 234

◆ $id

$id = 0
protected

См. определение в файле block.php строка 107

◆ $internalClass

$internalClass = 'BlockTable'
static

См. определение в файле block.php строка 101

◆ $landingActive

$landingActive = false
protected

См. определение в файле block.php строка 198

◆ $lid

$lid = 0
protected

См. определение в файле block.php строка 113

◆ $metaData

$metaData = array()
protected

См. определение в файле block.php строка 180

◆ $parentId

$parentId = 0
protected

См. определение в файле block.php строка 119

◆ $public

$public = false
protected

См. определение в файле block.php строка 216

◆ $repoId

$repoId = 0
protected

См. определение в файле block.php строка 137

◆ $repoInfo

$repoInfo = []
protected

См. определение в файле block.php строка 143

◆ $runtimeRequiredUserAction

$runtimeRequiredUserAction = []
protected

См. определение в файле block.php строка 167

◆ $siteId

$siteId = 0
protected

См. определение в файле block.php строка 125

◆ $sort

$sort = 0
protected

См. определение в файле block.php строка 131

◆ ACCESS_A

const ACCESS_A = 'A'

Access level: any access denied to all blocks.

См. определение в файле block.php строка 60

◆ ACCESS_D

const ACCESS_D = 'D'

Access level: access denied.

См. определение в файле block.php строка 65

◆ ACCESS_V

const ACCESS_V = 'V'

Access level: edit only design.

См. определение в файле block.php строка 70

◆ ACCESS_W

const ACCESS_W = 'W'

Access level: edit content and design (not delete).

См. определение в файле block.php строка 75

◆ ACCESS_X

const ACCESS_X = 'X'

Access level: full access.

См. определение в файле block.php строка 80

◆ BLOCKS_DIR

const BLOCKS_DIR = 'blocks'

Dir of repository of blocks.

См. определение в файле block.php строка 25

◆ BLOCKS_TAG

const BLOCKS_TAG = 'landing_blocks'

Tag for managed cache.

См. определение в файле block.php строка 30

◆ CARD_SYM_CODE

const CARD_SYM_CODE = 'card'

Symbolic code of card.

См. определение в файле block.php строка 85

◆ CSS_FILE_NAME

const CSS_FILE_NAME = 'style.css'

Local css filename.

См. определение в файле block.php строка 40

◆ DEFAULT_WRAPPER_STYLE

const DEFAULT_WRAPPER_STYLE = ['block-default']

Default setting for block wrapper style, if not set manifest[styles][block] section

См. определение в файле block.php строка 95

◆ JS_FILE_NAME

const JS_FILE_NAME = 'script.js'

Local js filename.

См. определение в файле block.php строка 45

◆ NEW_BLOCK_LT

const NEW_BLOCK_LT = 1209600

Life time for mark new block.

См. определение в файле block.php строка 55

◆ PRESET_SYM_CODE

const PRESET_SYM_CODE = 'preset'

Symbolic code of preset.

См. определение в файле block.php строка 90

◆ PREVIEW_FILE_NAME

const PREVIEW_FILE_NAME = 'preview.jpg'

Block preview filename.

См. определение в файле block.php строка 35

◆ REPO_MASK

const REPO_MASK = '/^repo_([\d]+)$/'

Pattern for repo code.

См. определение в файле block.php строка 50