Converts the field to a readonly variant.

@return ReadonlyTagField
162914
public function performReadonlyTransformation()
    {
        /** @var ReadonlyTagField $copy */
        $copy = $this->castedCopy(ReadonlyTagField::class);
        $copy->setSourceList($this->getSourceList());
        return $copy;
    }
310940
public function performReadonlyTransformation()
    {
        /** @var ReadonlyField $field */
        $field = $this->castedCopy(ReadonlyField::class)
            ->setTitle($this->title ? $this->title : _t('SilverStripe\\Security\\Member.PASSWORD', 'Password'))
            ->setValue('*****');

        return $field;
    }
286687
function updateReadOnlyFlag(annotationToEdit, readOnlyFields) {
  if (!annotationToEdit || !annotationToEdit.selection || !readOnlyFields) {
    return;
  }

  annotationToEdit.readOnly = SelectionBuilder.hasField(
    annotationToEdit.selection,
    readOnlyFields
  );
}
791059
protected function _toXMLFragment() 
    {
        $xml = "";
        foreach ($this->_fields as $fieldName => $field) {
            $fieldValue = $field['FieldValue'];
            if (!is_null($fieldValue)) {
                $fieldType = $field['FieldType'];
                if (is_array($fieldType)) {
                    if ($this->_isComplexType($fieldType[0])) {
                        foreach ($fieldValue as $item) {
                            $xml .= "<$fieldName>";
                            $xml .= $item->_toXMLFragment();
                            $xml .= "</$fieldName>";
                        }
                    } else {
                        foreach ($fieldValue as $item) {
                            $xml .= "<$fieldName>";
                            $xml .= $this->_escapeXML($item);
                            $xml .= "</$fieldName>";
                        }
                    }
                } else {
                    if ($this->_isComplexType($fieldType)) {
                        $xml .= "<$fieldName>";
                        $xml .= $fieldValue->_toXMLFragment();
                        $xml .= "</$fieldName>";
                    } else {
                        $xml .= "<$fieldName>";
                        $xml .= $this->_escapeXML($fieldValue);
                        $xml .= "</$fieldName>";
                    }
                }
            }
        }
        return $xml;
    }
291510
public function pushBack(){
		
		if($this->_ReadOnly){
			throw new ReadOnlyException(\get_called_class() . ' is read only');
		}
		
		$this->_Arr = \array_merge($this->_Arr, \func_get_args());
		
		return $this;
		
	}
713280
public function readonly()
    {
        if (null === $this->readonly) {
            $this->readonly = false;

            // check for <Resource>::hideActions() method.
            if (method_exists($this->module, 'readonly')) {
                $this->readonly = $this->module->readonly();
            }

            // check for <Actions>::readonly() method.
            elseif (method_exists($this->service, 'readonly')) {
                $this->readonly = $this->service->readonly();
            }
        }

        return $this->readonly;
    }
1219173
private function removeUnprocessableTags()
    {
        foreach ($this->unprocessableHtmlTags as $tagName) {
            // Deleting nodes from a 'live' NodeList invalidates iteration on it, so a copy must be made to iterate.
            $nodes = [];
            foreach ($this->domDocument->getElementsByTagName($tagName) as $node) {
                $nodes[] = $node;
            }
            /** @var \DOMNode $node */
            foreach ($nodes as $node) {
                $hasContent = $node->hasChildNodes() || $node->hasChildNodes();
                if (!$hasContent) {
                    $node->parentNode->removeChild($node);
                }
            }
        }
    }
815392
public function readOnly($callback = null)
    {
        if (!$callback || (is_callable($callback) && call_user_func($callback))) {
            return $this->withMeta(['readOnly' => true]);
        }
        return $this;
    }
274072
public boolean skipField(final int tag) throws IOException
    {
        switch (WireFormat.getTagWireType(tag))
        {
            case WireFormat.WIRETYPE_VARINT:
                readInt32();
                return true;
            case WireFormat.WIRETYPE_FIXED64:
                readRawLittleEndian64();
                return true;
            case WireFormat.WIRETYPE_LENGTH_DELIMITED:
                skipRawBytes(readRawVarint32());
                return true;
            case WireFormat.WIRETYPE_START_GROUP:
                skipMessage();
                checkLastTagWas(WireFormat.makeTag(WireFormat.getTagFieldNumber(tag),
                        WireFormat.WIRETYPE_END_GROUP));
                return true;
            case WireFormat.WIRETYPE_END_GROUP:
                return false;
            case WireFormat.WIRETYPE_FIXED32:
                readRawLittleEndian32();
                return true;
            default:
                throw ProtobufException.invalidWireType();
        }
    }
1313829
public function performBan()
    {
        if (!$this->_getHelper()->isActive()) {
            return $this;
        }
        
        $tagsToBan = array_unique($this->_getProcessor()->getTagsToBan());
        if ($tagsToBan) {
            try {
                $tagsToBan = array_map(
                    array(Mage::helper('ecomdev_varnish'), 'formatObjectTag'),
                    $tagsToBan
                );
                
                $queue = Mage::app()->getCache()->load(self::VARNISH_CACHE_QUEUE, true);
                
                if ($queue) {
                    $queue = unserialize($queue);
                    foreach ($tagsToBan as $tag) {
                        $queue[] = $tag;
                    }
                } else {
                    $queue = $tagsToBan;
                }
                
                $queue = serialize($queue);
                
                Mage::app()->getCache()->save($queue, self::VARNISH_CACHE_QUEUE);
            } catch (Exception $e) {
                Mage::logException($e);
            }
        }
        
        return $this;
    }
1156768
public function readOuterXml()
    {
        // Compatibility libxml 20620 (2.6.20) or later - LIBXML_VERSION  / LIBXML_DOTTED_VERSION
        if (method_exists($this->reader, 'readOuterXml')) {
            return $this->reader->readOuterXml();
        }

        if (0 === $this->reader->nodeType) {
            return '';
        }

        $doc = new DOMDocument();

        $doc->preserveWhiteSpace = false;
        $doc->formatOutput       = true;

        $node = $this->expand($doc);

        return $doc->saveXML($node);
    }
133894
public function performDisabledTransformation()
    {
        $newChildren = new FieldList();
        $clone = clone $this;
        if ($clone->getChildren()) {
            foreach ($clone->getChildren() as $child) {
                        /** @var FormField $child */
                $child = $child->transform(new DisabledTransformation());
                $newChildren->push($child);
            }
        }

        $clone->setChildren($newChildren);
        $clone->setDisabled(true);
        $clone->addExtraClass($this->extraClass());
        $clone->setDescription($this->getDescription());
        foreach ($this->attributes as $k => $v) {
            $clone->setAttribute($k, $v);
        }

        return $clone;
    }
963315
def get_readonly_fields(self, request, obj=None):
        

        # Get read only fields from super
        fields = list(super(CreateUpdateAdmin, self).get_readonly_fields(
            request=request, obj=obj))

        # Loop over ownership info field
        for k, v in self.ownership_info['fields'].items():

            # Check if model has k attribute
            # and field k is readonly
            # and k is not already in fields
            # and k is not in excluded field
            # (if not checked, form.Meta.exclude has same field twice)
            if (hasattr(self.model, k)
                    and ('readonly' in v and v['readonly'])
                    and k not in fields
                    and (not self.exclude
                         or (self.exclude and k not in self.exclude))):
                fields.append(k)
        return tuple(fields)
958120
def get_readonly_fields(self, request, obj=None):
        """"""
        return list(self.readonly_fields) + [field.name for field in obj._meta.fields]
358404
public function isReadOnly()
    {
        $readOnly = false;
        $fields   = $this->getPart(Zend_Db_Table_Select::COLUMNS);
        $cols     = $this->_info[Zend_Db_Table_Abstract::COLS];

        if (!count($fields)) {
            return $readOnly;
        }

        foreach ($fields as $columnEntry) {
            $column = $columnEntry[1];
            $alias = $columnEntry[2];

            if ($alias !== null) {
                $column = $alias;
            }

            switch (true) {
                case ($column == self::SQL_WILDCARD):
                    break;

                case ($column instanceof Zend_Db_Expr):
                case (!in_array($column, $cols)):
                    $readOnly = true;
                    break 2;
            }
        }

        return $readOnly;
    }
726836
protected function getUnselectedFields() {
    $profile_fields = $this->fieldStorage->loadByProperties(['entity_type' => 'profile', 'bundle' => 'profile']);
    $settings = $this->configFactory->get('social_profile_fields.settings');
    $empty = [];

    /** @var \Drupal\field\Entity\FieldConfig $value */
    foreach ($profile_fields as $key => $value) {
      $sval = $settings->get(str_replace('.', '_', $key));

      if (isset($sval) && $sval == FALSE) {
        $empty[] = $value->getName();
      }
    }
    return $empty;
  }
108072
protected function checkReadonlyField(&$data) {
        if(!empty($this->readonlyField)) {
            foreach ($this->readonlyField as $key=>$field){
                if(isset($data[$field]))
                    unset($data[$field]);
            }
        }
        return $data;
    }